move to using /src - still css issue work
Some checks failed
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Failing after 23s

This commit is contained in:
2025-11-12 14:55:28 -08:00
parent dcb81647e4
commit 24a1c61679
84 changed files with 36 additions and 37 deletions

View File

@@ -15,6 +15,6 @@
<body>
<div id="root"></div>
<!-- Vite will inject the correct <script> tag here during the build process -->
<script type="module" src="/index.tsx"></script>
<script type="module" src="/src/index.tsx"></script>
</body>
</html>

View File

@@ -9,18 +9,18 @@ import { ErrorDisplay } from './components/ErrorDisplay';
import { Header } from './components/Header';
import { logger } from './services/logger';
import { isImageAFlyer, extractCoreDataFromImage, extractAddressFromImage, extractLogoFromImage } from "./services/geminiService";
import type { FlyerItem, Flyer, MasterGroceryItem, DealItem, ProcessingStage, StageStatus, Profile, ShoppingList, ShoppingListItem } from './types';
import type { FlyerItem, Flyer, MasterGroceryItem, DealItem, ProcessingStage, StageStatus, Profile, ShoppingList, ShoppingListItem } from '../types';
import { BulkImporter } from './components/BulkImporter';
import { PriceHistoryChart } from './components/PriceHistoryChart';
import { supabase, uploadFlyerImage, createFlyerRecord, saveFlyerItems, getFlyers, getFlyerItems, findFlyerByChecksum, getWatchedItems, addWatchedItem, getAllMasterItems, getFlyerItemsForFlyers, countFlyerItemsForFlyers, getUserProfile, updateUserPreferences, removeWatchedItem, getShoppingLists, createShoppingList, addShoppingListItem, updateShoppingListItem, removeShoppingListItem, deleteShoppingList, uploadLogoAndUpdateStore } from './services/supabaseClient';
import { FlyerList } from './components/FlyerList';
import { recordProcessingTime, getAverageProcessingTime } from './utils/processingTimer';
import { recordProcessingTime, getAverageProcessingTime } from '../utils/processingTimer';
import { ProcessingStatus } from './components/ProcessingStatus';
import { generateFileChecksum } from './utils/checksum';
import { convertPdfToImageFiles } from './utils/pdfConverter';
import { generateFileChecksum } from '../utils/checksum';
import { convertPdfToImageFiles } from '../utils/pdfConverter';
import { BulkImportSummary } from './components/BulkImportSummary';
import { WatchedItemsList } from './components/WatchedItemsList';
import { withTimeout } from './utils/timeout';
import { withTimeout } from '../utils/timeout';
import { Session } from '@supabase/supabase-js';
import { ProfileManager } from './components/ProfileManager';
import { ShoppingListComponent } from './components/ShoppingList';

View File

@@ -1,5 +1,5 @@
import React from 'react';
import { SystemCheck } from '../components/SystemCheck';
import { SystemCheck } from './SystemCheck';
import { Link } from 'react-router-dom';
export const AdminPage: React.FC = () => {

View File

@@ -1,6 +1,6 @@
import React from 'react';
import { Navigate, Outlet } from 'react-router-dom';
import type { Profile } from '../types';
import type { Profile } from '../../types';
interface AdminRouteProps {
profile: Profile | null;

View File

@@ -1,6 +1,6 @@
import React, { useState, useCallback } from 'react';
import { AnalysisType, FlyerItem, Store } from '../types';
import { AnalysisType, FlyerItem, Store } from '../../types';
import type { GroundingChunk } from '@google/genai';
import { getQuickInsights, getDeepDiveAnalysis, searchWeb, planTripWithMaps, generateImageFromText } from '../services/geminiService';
import { LoadingSpinner } from './LoadingSpinner';

View File

@@ -1,5 +1,5 @@
import React, { useState } from 'react';
import type { SuggestedCorrection, MasterGroceryItem } from '../types';
import type { SuggestedCorrection, MasterGroceryItem } from '../../types';
import { approveCorrection, rejectCorrection } from '../services/supabaseClient';
import { logger } from '../services/logger';
import { CheckIcon } from './icons/CheckIcon';

View File

@@ -1,6 +1,6 @@
import React, { useMemo, useState } from 'react';
import type { FlyerItem, MasterGroceryItem, ShoppingList } from '../types';
import { formatUnitPrice } from '../utils/unitConverter';
import type { FlyerItem, MasterGroceryItem, ShoppingList } from '../../types';
import { formatUnitPrice } from '../../utils/unitConverter';
import { Session } from '@supabase/supabase-js';
import { PlusCircleIcon } from './icons/PlusCircleIcon';

View File

@@ -1,6 +1,6 @@
import React from 'react';
import type { Store } from '../types';
import type { Store } from '../../types';
const formatDateRange = (from: string | null | undefined, to: string | null | undefined): string | null => {
if (!from && !to) return null;

View File

@@ -1,5 +1,5 @@
import React from 'react';
import type { Flyer } from '../types';
import type { Flyer } from '../../types';
import { DocumentTextIcon } from './icons/DocumentTextIcon';
const formatShortDate = (dateString: string | null | undefined): string | null => {

View File

@@ -11,7 +11,7 @@ import { Cog8ToothIcon } from './icons/Cog8ToothIcon';
import { MicrophoneIcon } from './icons/MicrophoneIcon';
import { Link } from 'react-router-dom';
import { ShieldCheckIcon } from './icons/ShieldCheckIcon';
import { Profile } from '../types';
import { Profile } from '../../types';
type AuthStatus = 'SIGNED_OUT' | 'ANONYMOUS' | 'AUTHENTICATED';
interface HeaderProps {

View File

@@ -1,8 +1,8 @@
import React from 'react';
import type { DealItem } from '../types';
import type { DealItem } from '../../types';
import { TagIcon } from './icons/TagIcon';
import { LoadingSpinner } from './LoadingSpinner';
import { formatUnitPrice } from '../utils/unitConverter';
import { formatUnitPrice } from '../../utils/unitConverter';
import { Session } from '@supabase/supabase-js';
import { UserIcon } from './icons/UserIcon';

View File

@@ -2,7 +2,7 @@ import React, { useState, useEffect, useMemo } from 'react';
import { LineChart, Line, XAxis, YAxis, CartesianGrid, Tooltip, Legend, ResponsiveContainer } from 'recharts';
import { getHistoricalWatchedItems } from '../services/supabaseClient';
import { LoadingSpinner } from './LoadingSpinner';
import type { MasterGroceryItem, FlyerItem } from '../types';
import type { MasterGroceryItem, FlyerItem } from '../../types';
type HistoricalData = Record<string, { date: string; price: number }[]>; // price is in cents
type ChartData = { date: string; [itemName: string]: number | string };

View File

@@ -2,7 +2,7 @@ import React, { useState, useEffect } from 'react';
import { LoadingSpinner } from './LoadingSpinner';
import { CheckCircleIcon } from './icons/CheckCircleIcon';
import { ExclamationTriangleIcon } from './icons/ExclamationTriangleIcon';
import { StageStatus, ProcessingStage } from '../types';
import { StageStatus, ProcessingStage } from '../../types';
interface ProcessingStatusProps {
stages: ProcessingStage[];

View File

@@ -1,6 +1,6 @@
import React, { useState, useEffect } from 'react';
import { Session } from '@supabase/supabase-js';
import type { Profile } from '../types';
import type { Profile } from '../../types';
import { supabase, updateUserProfile, updateUserPassword, exportUserData, deleteUserAccount } from '../services/supabaseClient';
import { logger } from '../services/logger';
import { LoadingSpinner } from './LoadingSpinner';

View File

@@ -1,13 +1,13 @@
import React, { useState, useMemo, useCallback } from 'react';
import { Session } from '@supabase/supabase-js';
import type { ShoppingList, ShoppingListItem } from '../types';
import type { ShoppingList, ShoppingListItem } from '../../types';
import { UserIcon } from './icons/UserIcon';
import { ListBulletIcon } from './icons/ListBulletIcon';
import { LoadingSpinner } from './LoadingSpinner';
import { TrashIcon } from './icons/TrashIcon';
import { SpeakerWaveIcon } from './icons/SpeakerWaveIcon';
import { generateSpeechFromText } from '../services/geminiService';
import { decode, decodeAudioData } from '../utils/audioUtils';
import { decode, decodeAudioData } from '../../utils/audioUtils';
interface ShoppingListComponentProps {
session: Session | null;

View File

@@ -1,5 +1,5 @@
import React, { useMemo } from 'react';
import type { FlyerItem } from '../types';
import type { FlyerItem } from '../../types';
import { TrophyIcon } from './icons/TrophyIcon';
interface TopDealsProps {

View File

@@ -4,7 +4,7 @@ import { XMarkIcon } from './icons/XMarkIcon';
import { MicrophoneIcon } from './icons/MicrophoneIcon';
// FIX: Corrected the import path. Types should be imported from the top-level '@google/genai' package.
import { LiveServerMessage, Blob } from '@google/genai';
import { encode } from '../utils/audioUtils';
import { encode } from '../../utils/audioUtils';
interface VoiceAssistantProps {
isOpen: boolean;

View File

@@ -1,10 +1,10 @@
import React, { useState, useMemo } from 'react';
import type { MasterGroceryItem } from '../types';
import type { MasterGroceryItem } from '../../types';
import { EyeIcon } from './icons/EyeIcon';
import { LoadingSpinner } from './LoadingSpinner';
import { SortAscIcon } from './icons/SortAscIcon';
import { SortDescIcon } from './icons/SortDescIcon';
import { CATEGORIES } from '../types';
import { CATEGORIES } from '../../types';
import { Session } from '@supabase/supabase-js';
import { TrashIcon } from './icons/TrashIcon';
import { UserIcon } from './icons/UserIcon';

View File

@@ -2,7 +2,7 @@ import React, { useEffect, useState } from 'react';
import { Link } from 'react-router-dom';
import { getSuggestedCorrections, getAllMasterItems } from '../services/supabaseClient';
import { logger } from '../services/logger';
import type { SuggestedCorrection, MasterGroceryItem } from '../types';
import type { SuggestedCorrection, MasterGroceryItem } from '../../types';
import { LoadingSpinner } from '../components/LoadingSpinner';
import { ArrowPathIcon } from '../components/icons/ArrowPathIcon';
import { CorrectionRow } from '../components/CorrectionRow';

View File

@@ -1,9 +1,9 @@
import { GoogleGenAI, Type, Modality, GroundingChunk } from "@google/genai";
import type { FlyerItem, MasterGroceryItem, UnitPrice, Store } from "../types";
import { CATEGORIES } from '../types';
import { parsePriceToCents } from '../utils/priceParser';
import type { FlyerItem, MasterGroceryItem, UnitPrice, Store } from "../../types";
import { CATEGORIES } from '../../types';
import { parsePriceToCents } from '../../utils/priceParser';
// In a Vite project, environment variables are exposed on the `import.meta.env` object.
// For security, only variables prefixed with `VITE_` are exposed to the client-side code.

View File

@@ -1,7 +1,7 @@
import { createClient, SupabaseClient, PostgrestError } from '@supabase/supabase-js';
import type { Flyer, FlyerItem, MasterGroceryItem, Profile, ShoppingList, ShoppingListItem, Store, SuggestedCorrection, UnitPrice } from '../types';
import type { Flyer, FlyerItem, MasterGroceryItem, Profile, ShoppingList, ShoppingListItem, Store, SuggestedCorrection, UnitPrice } from '../../types';
import { logger } from './logger';
import { Database, Json } from '../types/supabase';
import { Database, Json } from '../../types/supabase';
// In a Vite project, environment variables are exposed on the `import.meta.env` object.
// For security, only variables prefixed with `VITE_` are exposed to the client-side code.

View File

@@ -1,17 +1,16 @@
import path from 'node:path';
import { fileURLToPath } from 'node:url';
// Boilerplate to get the equivalent of __dirname in an ES module
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
/** @type {import('tailwindcss').Config} */
export default {
content: [
// Resolve paths absolutely from the config file's location
// Point to the root index.html
path.resolve(__dirname, './index.html'),
path.resolve(__dirname, './App.tsx'),
path.resolve(__dirname, './index.tsx'),
path.resolve(__dirname, './{components,pages,services,utils}/**/*.{js,ts,jsx,tsx}'),
// Scan for all relevant files inside the new 'src' directory
path.resolve(__dirname, './src/**/*.{js,ts,jsx,tsx}'),
],
};