Skip to content

Conversation

svemat01
Copy link
Member

No description provided.

svemat01 and others added 15 commits February 19, 2025 12:58
- Replaced itty-router with Hono for routing
- Restructured project with new utility modules
- Updated dependencies and configuration
- Simplified route handling and middleware
- Improved type safety and code organization
- Introduced header image routes and utilities
- Renamed BANNER_BUCKET to HEADER_BUCKET in configuration
- Created separate routes for header image upload and retrieval
- Extracted common image handling logic into utility functions
- Implemented similar pattern to avatar image handling
- Refactored ESLint configuration to use defineConfig for better clarity
- Updated ESLint and related dependencies to the latest versions
- Added lint script to package.json for easier linting
- Improved code formatting and consistency across various files
- Changed route paths for header retrieval and upload from "/:name/header" to "/:name/h"
- Added uploadType parameter to getVerifiedAddress for better handling of upload types
- Updated avatar and header routes to include specific uploadType values ("avatar" and "header") in the request payload
- Updated package.json to reflect new versions for various dependencies including Hono, Valibot, and Viem.
- Added new scripts for type generation and type checking.
- Enhanced tsconfig.json with additional compiler options for better type safety and module resolution.
- Regenerated worker-configuration.d.ts with updated runtime types from workerd@1.20250310.0.
- Introduced a new media utility to manage unregistered and registered media files for avatars and headers.
- Refactored existing avatar and header routes to utilize the new media utility for promoting unregistered media.
- Added tests for media handling functions to ensure proper functionality and coverage.
- Removed deprecated avatar and header utility functions to streamline the codebase.
- Introduced ENVIRONMENT variable to support different deployment environments (dev, staging, production).
- Updated worker-configuration.d.ts to include the new ENVIRONMENT interface.
- Modified wrangler.jsonc to define environment-specific variables for staging and production.
- Removed unnecessary import of sha256 from hono/utils/crypto.
- Updated avatar and header routes to directly use sha256 from viem for hashing image bytes.
- Adjusted the hash format in the request payload to remove the `0x` prefix.
- Implemented integration tests for avatar and header routes to ensure proper functionality.
- Created test cases for GET and PUT requests, covering scenarios for registered and unregistered media.
- Added helper functions for test data generation and mock setups to streamline testing process.
- Updated existing test utilities to support new test cases and improve overall test coverage.
- Updated client middleware to safely parse WEB3_ENDPOINT_MAP, providing a default empty object if not defined. This change improves robustness against undefined environment variables.
- Added R2GetOrHead utility to handle both GET and HEAD requests for avatar and header routes.
- Updated routes to return appropriate metadata for HEAD requests, including content type and length, while ensuring the body is empty.
- Enhanced integration tests to verify HEAD request functionality and ensure proper handling of registered and unregistered media across different networks.
…ions

- Added detailed installation and setup instructions using pnpm.
- Included a new section for publishing the package.
- Provided a note on configuring the WEB3_ENDPOINT_MAP as a secret value with JSON structure example.
- Upgraded cloudflare/wrangler-action from version 2.0.0 to v3 in the GitHub Actions deploy workflow to leverage new features and improvements.
@svemat01 svemat01 marked this pull request as ready for review April 23, 2025 13:25
storywithoutend and others added 12 commits September 4, 2025 14:51
- Add Claude settings configuration
- Update example vars with localhost chain
- Add localhost chain configuration in utils
- Add error handling utilities
- Update chains configuration with localhost support
- Enhance owner resolution logic
- Update worker configuration types
- Update avatar route implementation

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
- Remove debug console.log statements
- Simplify HEAD request handling for unregistered headers
- Maintain original functionality

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
- Return null body for HEAD requests using c.body(null)
- Maintain headers while returning no content for HEAD requests

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
The test script was using 'vitest' which runs in watch mode and never exits.
Changed to 'vitest run' to ensure tests complete and exit properly in CI.
Added 'test:watch' script for local development with watch mode.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Created .test.vars with public RPC endpoints for tests
- Updated vitest.config.ts to use .test.vars for environment variables
- This ensures tests have required WEB3_ENDPOINT_MAP in CI environment

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
…on issue

- Viem handles chainId differently for holesky during EIP-712 signature verification
- While mainnet/goerli/sepolia don't add chainId when not explicitly provided, holesky does
- This causes cross-chain signature verification to fail since test signatures use mainnet wallet
- Added detailed comments explaining the exclusion

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Modified test workflow configuration
- Updated avatar route integration tests

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Update avatar and header routes
- Modify owner utility functions
- Add new subname utility module

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Reorganize imports in avatar and header routes
- Format subname utility code for consistency

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@laurgk laurgk merged commit fc7b444 into main Oct 20, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants