- Create AuthHeaderProvider that integrates with Firebase and API key stores
- Add core extension to register auth provider during preInit
- Implement automatic auth header injection for all HTTP requests
- Add comprehensive unit and integration tests
- Include examples showing migration from manual to automatic auth
This completes the header registration system by connecting it to the
actual authentication mechanisms in ComfyUI.
Co-Authored-By: Claude <noreply@anthropic.com>
- Add preInit hook to ComfyExtension interface that runs before canvas creation
- Implement preInit invocation in app.ts after extension loading
- Create example extension demonstrating header provider registration
- Add comprehensive tests for hook execution order and error handling
This enables extensions to register services and cross-cutting concerns
before any other initialization occurs.
Co-Authored-By: Claude <noreply@anthropic.com>
- Replace direct fetch() with fetchWithHeaders across entire codebase
- Replace axios.create() with createAxiosWithHeaders in all services
- Update tests to properly mock network client adapters
- Fix hoisting issues in test mocks for axios instances
- Ensure all network calls now support header injection
This completes Step 2: integrating the header registry infrastructure with all existing HTTP clients in the codebase.
- Create TypeScript interfaces for header providers
- Implement header registry with priority-based ordering
- Add network client adapters that integrate with the registry
- Add comprehensive unit tests
Co-Authored-By: Claude <noreply@anthropic.com>
Use vi.mock() with factory function to ensure axios mock is set up before module imports. This fixes test failures caused by the store creating axios client at module level.
Fixes test execution in CI
- Move axios mock setup before store import to ensure client is mocked
- Set up default successful responses for customer API endpoints
- Fix TypeScript issues with isAxiosError mock type
- Add comprehensive test coverage for the new --disable-api-nodes argument handling
- Tests verify release fetching is properly skipped when argument is present
- Cover edge cases including multiple args, null argv, and missing system stats
- Ensures backward compatibility when argument is not present
- Updated all imports from '@comfyorg/litegraph' to '@/lib/litegraph/src/'
- Replaced deep dist imports with direct source paths
- Updated CSS import in main.ts
- All imports now use the @ alias consistently