Commit Graph

124 Commits

Author SHA1 Message Date
renovate[bot]
805d427e47 fix(deps): update all non-major dependencies 2025-12-13 05:50:40 +00:00
dependabot[bot]
bc169c3621 chore(deps): bump jws from 4.0.0 to 4.0.1 in /website/server
Bumps [jws](https://github.com/brianloveswords/node-jws) from 4.0.0 to 4.0.1.
- [Release notes](https://github.com/brianloveswords/node-jws/releases)
- [Changelog](https://github.com/auth0/node-jws/blob/master/CHANGELOG.md)
- [Commits](https://github.com/brianloveswords/node-jws/compare/v4.0.0...v4.0.1)

---
updated-dependencies:
- dependency-name: jws
  dependency-version: 4.0.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-04 18:12:22 +00:00
Kazuki Yamada
87514044c7 Merge pull request #989 from yamadashy/dependabot/npm_and_yarn/website/server/modelcontextprotocol/sdk-1.24.0
chore(deps): bump @modelcontextprotocol/sdk from 1.23.0 to 1.24.0 in /website/server
2025-12-04 00:42:00 +09:00
dependabot[bot]
8b27b9c6fd chore(deps): bump @modelcontextprotocol/sdk in /website/server
Bumps [@modelcontextprotocol/sdk](https://github.com/modelcontextprotocol/typescript-sdk) from 1.23.0 to 1.24.0.
- [Release notes](https://github.com/modelcontextprotocol/typescript-sdk/releases)
- [Commits](https://github.com/modelcontextprotocol/typescript-sdk/compare/1.23.0...1.24.0)

---
updated-dependencies:
- dependency-name: "@modelcontextprotocol/sdk"
  dependency-version: 1.24.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-03 15:34:17 +00:00
dependabot[bot]
9779794027 chore(deps): bump express from 5.1.0 to 5.2.1 in /website/server
Bumps [express](https://github.com/expressjs/express) from 5.1.0 to 5.2.1.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/v5.1.0...v5.2.1)

---
updated-dependencies:
- dependency-name: express
  dependency-version: 5.2.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-03 15:33:52 +00:00
renovate[bot]
92ef98329d fix(deps): update all non-major dependencies 2025-12-03 15:16:23 +00:00
dependabot[bot]
0d2e2f5f24 chore(deps): bump body-parser from 2.2.0 to 2.2.1 in /website/server
Bumps [body-parser](https://github.com/expressjs/body-parser) from 2.2.0 to 2.2.1.
- [Release notes](https://github.com/expressjs/body-parser/releases)
- [Changelog](https://github.com/expressjs/body-parser/blob/master/HISTORY.md)
- [Commits](https://github.com/expressjs/body-parser/compare/v2.2.0...v2.2.1)

---
updated-dependencies:
- dependency-name: body-parser
  dependency-version: 2.2.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-27 15:20:46 +00:00
renovate[bot]
e5b5a204d4 fix(deps): update all non-major dependencies 2025-11-27 10:16:30 +00:00
dependabot[bot]
6706b11e09 chore(deps-dev): bump glob from 11.0.3 to 11.1.0 in /website/server
Bumps [glob](https://github.com/isaacs/node-glob) from 11.0.3 to 11.1.0.
- [Changelog](https://github.com/isaacs/node-glob/blob/main/changelog.md)
- [Commits](https://github.com/isaacs/node-glob/compare/v11.0.3...v11.1.0)

---
updated-dependencies:
- dependency-name: glob
  dependency-version: 11.1.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-18 13:31:10 +00:00
renovate[bot]
18ef52acc1 fix(deps): update all non-major dependencies 2025-11-11 13:38:56 +00:00
renovate[bot]
c5a7f52681 fix(deps): update all non-major dependencies 2025-11-03 16:39:17 +09:00
renovate[bot]
8b6bd0cb40 fix(deps): update all non-major dependencies 2025-10-30 09:57:02 +00:00
renovate[bot]
225b3590cc chore(deps): update dependency hono to v4.10.3 [security] 2025-10-25 08:04:15 +00:00
renovate[bot]
17f0a43a93 chore(deps): update dependency hono to v4.10.2 [security] 2025-10-22 15:49:07 +00:00
renovate[bot]
e1a8c6c4e2 fix(deps): update all non-major dependencies 2025-10-20 13:33:05 +00:00
renovate[bot]
1f9f243a75 fix(deps): update all non-major dependencies 2025-10-13 08:58:25 +00:00
renovate[bot]
372c8d7f00 fix(deps): update all non-major dependencies 2025-10-08 07:53:07 +00:00
Kazuki Yamada
9ffffa388e chore(deps): Update dependencies across browser and website packages
Updated multiple dependencies to their latest versions:
- @types/chrome: 0.1.1 → 0.1.14
- @types/node: 24.5.2 → 24.6.0
- sharp: 0.34.3 → 0.34.4
- tsx: 4.20.5 → 4.20.6
- @hono/node-server: 1.19.3 → 1.19.5
- hono: 4.9.8 → 4.9.9
- winston: 3.17.0 → 3.18.1

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-30 22:33:42 +09:00
Kazuki Yamada
12ea47b472 refactor(website): address PR review feedback for type safety and code quality
Improve type safety and code quality based on PR review comments:
- Convert PackButton.vue to TypeScript with proper type definitions
- Fix AbortSignal.reason comparison using strict equality instead of String()
- Extract magic number constant for API timeout in server configuration

These changes enhance type safety, improve code robustness, and increase
maintainability as suggested by automated code reviewers.
2025-09-23 22:04:20 +09:00
autofix-ci[bot]
d6b4a363be [autofix.ci] apply automated fixes 2025-09-23 11:37:42 +00:00
Kazuki Yamada
d9e141ec65 feat(website): add cancel functionality for pack requests
Implement cancel button for pack requests with improved user experience.
The button now shows "Cancel" on hover during processing and allows users
to abort ongoing requests. Also improved error messages for better clarity.

- Add cancel functionality to PackButton with hover state
- Implement request cancellation using AbortController
- Improve error messages for remote repository processing failures
- Update timeout handling and server configuration
- Add proper event handling to prevent form submission conflicts
2025-09-23 19:52:10 +09:00
Kazuki Yamada
f87e00dbdf chore(lint): upgrade biome to v2.2.4 and fix all lint errors
Updated biome from v1.9.4 to v2.2.4 to take advantage of latest linting improvements.

- Upgraded @biomejs/biome from ^1.9.4 to ^2.2.4
- Updated biome.json configuration for v2 compatibility:
  - Changed schema to 2.2.4
  - Updated file includes/ignores syntax
  - Added Vue file overrides to disable noUnusedVariables/noUnusedImports
- Fixed all lint errors:
  - Added radix parameter to parseInt calls
  - Prefixed unused parameters with underscore
  - Removed unused imports
  - Fixed biome suppression comments
  - Removed !important from CSS
  - Added type ignores for Vue component definitions

All 325 files now pass lint with 0 warnings and 0 errors.
2025-09-21 13:39:43 +09:00
Kazuki Yamada
ef7e0c370f chore(deps): update package-lock.json dependencies
Update package-lock.json files across browser, website client, and website server:
- brace-expansion: 1.1.11 → 1.1.12, 2.0.1 → 2.0.2
- vite: 5.4.19 → 5.4.20, 7.0.5 → 7.1.6
- fdir: 6.4.6 → 6.5.0
- tinyglobby: 0.2.14 → 0.2.15
- picomatch: 4.0.2 → 4.0.3
2025-09-21 13:03:21 +09:00
Kazuki Yamada
947b1c780e fix(website): update Zod v4 compatibility
Updates validation.ts to use Zod v4 API:
- Changed error.errors to error.issues
- Renamed parameter from err to issue for clarity

This resolves build errors after upgrading to Zod v4.
2025-09-21 12:25:09 +09:00
Kazuki Yamada
7fc99b8fba chore(website): update repomix dependency to v1.6.0
Update package-lock.json to reflect the latest repomix version dependency
2025-09-21 12:11:17 +09:00
dependabot[bot]
f576c3fd9e chore(deps): bump hono from 4.8.5 to 4.9.7 in /website/server
Bumps [hono](https://github.com/honojs/hono) from 4.8.5 to 4.9.7.
- [Release notes](https://github.com/honojs/hono/releases)
- [Commits](https://github.com/honojs/hono/compare/v4.8.5...v4.9.7)

---
updated-dependencies:
- dependency-name: hono
  dependency-version: 4.9.7
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-12 21:47:45 +00:00
Kazuki Yamada
90feedf14f chore(website): Update repomix dependency to v1.4.1
Update website server dependency to use the latest version of repomix
with recent bug fixes and improvements.
2025-08-30 15:39:03 +09:00
yamadashy
92caf5003d feat: us 2025-08-27 00:56:14 +09:00
Kazuki Yamada
d861cfc364 feat(website): Reduce Cloud Run CPU allocation from 2 to 1
This change optimizes resource usage for the website server by reducing
the CPU allocation in the Cloud Run deployment configuration. The change
should maintain adequate performance while reducing operational costs.
2025-08-26 22:51:36 +09:00
Kazuki Yamada
4e20fc5e99 refactor(website): Improve logger code style based on PR feedback
- Extract isProduction constant to avoid magic strings
- Use ternary operator for more concise transport initialization
- Reuse isProduction constant for log level configuration
- Improve code readability and maintainability

Addresses feedback from @Copilot and @gemini-code-assist[bot]
2025-08-26 00:51:57 +09:00
Kazuki Yamada
3d9e629b0f fix(website): Resolve duplicate logging in production
- Separate transport configuration for production and development
- Production: Use only Cloud Logging transport to prevent duplicates
- Development: Use only Console transport for local debugging
- Fixes issue where Cloud Logging and Console transports caused duplicate log entries
2025-08-26 00:51:57 +09:00
Kazuki Yamada
b492ebc4cd refactor(website): Extract HTTP response utilities to dedicated http.ts
- Move createErrorResponse function and ErrorResponse interface from logger.ts to utils/http.ts
- Update imports across packAction.ts, rateLimit.ts, and bodyLimit.ts
- Improve separation of concerns: logging utilities vs HTTP response utilities
- Maintains consistent error response format across the application
2025-08-24 23:50:47 +09:00
Kazuki Yamada
3326fdf951 fix(website): Address PR review comments
- Use FILE_SIZE_LIMITS constant instead of hardcoded value in packAction.ts
- Remove redundant URL validation check (Zod schema already validates)
- Use createErrorResponse for consistent error handling in rateLimit.ts
- Add try-catch for JSON.parse with proper error handling
- Enhance sanitizePattern to block Windows absolute and UNC paths for security
- Replace non-null assertion with type casting for better linting compliance
2025-08-24 23:47:26 +09:00
Kazuki Yamada
d4a2e769dd feat(website): Enhance memory tracking with before/after/diff metrics
- Add calculateMemoryDiff function to utils/memory.ts for memory usage comparison
- Replace logMemoryUsage with detailed before/after memory tracking in packAction
- Include memory diff calculation in Pack operation completed logs
- Add input type (file/url) information to operation logs for better monitoring
2025-08-24 23:42:34 +09:00
Kazuki Yamada
07c886d55c refactor(website): Move rate limiting to middleware layer
- Create dedicated rateLimitMiddleware for better separation of concerns
- Remove rate limiting logic from packAction to focus on business logic
- Apply rate limiting at middleware layer for early request blocking
- Simplify packAction by removing rate limiting imports and checks
- Improve middleware ordering in index.ts for optimal request processing

This architectural improvement follows the middleware pattern and provides:
- Better security through early rate limiting
- Cleaner action layer focused on business logic
- Consistent middleware-based approach for cross-cutting concerns
- Improved reusability for future API endpoints
2025-08-24 23:26:50 +09:00
Kazuki Yamada
6e67d58b2c refactor(website): Simplify packAction schema and remove redundant validation
- Inline schema definitions for better readability and reduced complexity
- Remove intermediate variables (packOptionsSchema, fileSchema, isValidZipFile, ignorePatternRegex)
- Eliminate redundant manual validation checks already covered by Zod schema:
  - Remove manual format enum validation (handled by z.enum)
  - Remove manual file/url existence check (handled by schema refinements)
- Consolidate validation logic entirely within the Zod schema for consistency

This simplification follows the DRY principle and ensures all validation is handled uniformly through the schema-first approach.
2025-08-24 23:18:12 +09:00
Kazuki Yamada
d146a7528a refactor(website): Improve action-layer architecture with centralized validation
Major improvements to the website server architecture following domain-driven design principles:

## Validation & Request Handling
- Move request validation from domain functions to packAction (action layer responsibility)
- Consolidate request schemas from separate files into packAction.ts for better colocation
- Create reusable utils/validation.ts for generic validation functionality
- Remove redundant validation.ts from actions directory

## Rate Limiting & Client Information
- Move rate limiting checks from domain functions to action layer
- Create utils/clientInfo.ts utility for centralized client information extraction
- Replace individual IP extraction with structured ClientInfo interface including IP, userAgent, and referer
- Update cloudLogger middleware to use unified clientInfo utility

## Code Organization
- Consolidate FILE_SIZE_LIMITS constants into domains/pack/utils/fileUtils.ts
- Remove unused constants.ts and schemas/request.ts files
- Rename middlewares/logger.ts to cloudLogger.ts with cloudLoggerMiddleware function for clarity
- Clean up domain function signatures by removing clientIp parameters

## Architecture Benefits
- Clear separation of concerns between action, domain, and utility layers
- Centralized validation and rate limiting at appropriate architectural boundaries
- Improved code reusability and maintainability
- Better error handling and client information management

This refactoring establishes a solid foundation for future feature development while maintaining backward compatibility.
2025-08-24 23:13:07 +09:00
Kazuki Yamada
eabf2c615a refactor(website): Extract middleware components to dedicated directory
This commit creates a dedicated middlewares directory and extracts Hono
middleware configurations from the main server file for better organization
and maintainability.

Changes:
- Create middlewares/ directory for middleware organization
- Extract cloudLogger middleware to middlewares/logger.ts:
  - Move custom logging middleware with request tracking
  - Generate unique request IDs and track request lifecycle
  - Include memory usage and latency monitoring
  - Fix type errors with proper function signatures
- Extract CORS configuration to middlewares/cors.ts:
  - Define allowed origins and headers
  - Handle development and production environments
- Extract body limit middleware to middlewares/bodyLimit.ts:
  - Configure request size limits
  - Handle file size exceeded errors
- Clean up utils/logger.ts:
  - Remove middleware-specific code
  - Export logger instance for reuse
  - Focus on pure logging utilities
- Simplify index.ts:
  - Import middleware from dedicated modules
  - Remove inline middleware configurations
  - Improve code readability and maintainability

This separation follows middleware best practices and makes the codebase
more modular while maintaining all existing functionality.
2025-08-24 22:43:41 +09:00
Kazuki Yamada
a35f70013f refactor(website): Move domain-specific utilities to pack domain
This commit reorganizes the utilities directory by moving pack-specific
utilities into the pack domain structure, following domain-driven design
principles.

Changes:
- Move pack-specific utilities to domains/pack/utils/:
  - cache.ts: PackResult-specific caching functionality
  - fileUtils.ts: ZIP processing and pack-related file operations
  - validation.ts: Pack request validation logic
  - sharedInstance.ts: Pack domain cache and rate limiter instances
- Keep generic utilities in utils/:
  - errorHandler.ts: Application-wide error handling
  - logger.ts: Cross-domain logging functionality
  - memory.ts: Cross-domain memory monitoring
  - network.ts: Cross-domain network utilities
  - processConcurrency.ts: System-wide CPU information
  - rateLimit.ts: Base rate limiting functionality
  - time.ts: Cross-domain time processing
- Update all import paths to reflect new structure
- Maintain separation of concerns between domain-specific and generic utilities

This improves code organization by placing domain-specific logic within
the appropriate domain boundaries while keeping truly generic utilities
accessible across all domains.
2025-08-24 22:27:03 +09:00
Kazuki Yamada
2da79f4080 refactor(website): Reorganize server code with domain-based architecture
This commit restructures the website server code to follow a domain-driven design pattern, improving maintainability and separation of concerns.

Changes:
- Create src/actions/ directory for API action handlers
- Create src/domains/pack/ directory for pack-related business logic
- Extract pack endpoint logic from index.ts into packAction.ts
- Move processZipFile.ts and remoteRepo.ts to domains/pack/
- Update all import paths to reflect new directory structure
- Simplify index.ts to focus on server configuration and routing

The new structure separates API routing (index.ts), action handlers (actions/),
and domain logic (domains/pack/) for better code organization.
2025-08-24 22:21:24 +09:00
Kazuki Yamada
686f401b42 chore(deps): Update @typescript/native-preview to latest version
- Update @typescript/native-preview from 7.0.0-dev.20250708.1 to 7.0.0-dev.20250824.1
- Update package-lock.json files for all subprojects to reflect the latest version
- Ensures compatibility with latest TypeScript native performance improvements

This keeps all packages in sync with the latest tsgo release for consistent type checking performance.
2025-08-24 18:56:38 +09:00
Kazuki Yamada
a564f5818b chore(deps): Replace tsc with tsgo for type checking in subprojects
- Update browser/package.json to use tsgo instead of tsc for lint-tsc script
- Update website/client/package.json to use tsgo instead of tsc for lint-tsc script
- Update website/server/package.json to use tsgo instead of tsc for lint-tsc script
- Add @typescript/native-preview dependency to all subprojects for tsgo compatibility

This aligns with the main package.json which already uses tsgo for faster TypeScript type checking.
2025-08-24 18:53:15 +09:00
Kazuki Yamada
b7fe6f25c5 fix(lint): resolve all oxlint warnings for code quality
- Remove unused imports across 67 files (RepomixConfigMerged, QueryCapture, etc.)
- Fix unused parameters by prefixing with underscore (_context, _index, etc.)
- Remove unused catch parameters using modern JavaScript syntax
- Fix require-yield warnings in generator functions
- Remove unused variables and interface declarations
- Add oxlint configuration to ignore integration test fixtures

Resolves 144 linting warnings while preserving all functionality.
All 743 tests continue to pass. Code quality significantly improved.
2025-08-24 18:25:08 +09:00
Kazuki Yamada
3fe7ed6fd6 feat(linter): integrate oxlint into lint pipeline
- Add oxlint as dev dependency and integrate into npm run lint
- Create oxlint configuration with warning levels for gradual adoption
- Add oxlint CI job to GitHub Actions
- Fix regex patterns flagged by oxlint:
  - Remove unnecessary escape characters in file regex patterns
  - Fix regex patterns in website validation and PHP test files
- Update lint script order: biome -> oxlint -> ts -> secretlint

oxlint provides 50-100x faster linting with 500+ rules from ESLint ecosystem.
Current warnings are configured as non-blocking to allow gradual improvement.
2025-08-24 18:25:08 +09:00
Kazuki Yamada
629e8bc173 refactor(website): improve file selection component structure and maintainability
- Extract constants: FILE_SELECTION_WARNING_THRESHOLD and TabType to dedicated files
- Extract warning message to reusable FileSelectionWarning component
- Optimize performance: replace deep watch with shallow watch and use structuredClone
- Enhance accessibility: add comprehensive aria-label attributes to all interactive elements
- Strengthen error handling: add zero division protection for percentage calculation
- Improve code quality: enhance comments and maintain consistent type definitions

This refactoring improves code maintainability, performance, and user experience
while following Vue.js and accessibility best practices.
2025-08-24 16:10:18 +09:00
Kazuki Yamada
2ddcaafb33 style(website): fix linting issues and improve code formatting
- Replace forEach loops with for...of loops for better performance
- Fix import ordering and spacing inconsistencies
- Simplify interface definitions and type declarations
- Add proper padding to tokens column in file selection table
- Remove unnecessary line breaks in computed properties
- Improve code readability and consistency across components
2025-08-24 15:39:04 +09:00
Kazuki Yamada
f7c14f64b8 feat(website): improve file selection UI and functionality
- Convert file list to table format with clickable rows and compact layout
- Add warning message when selecting more than 500 files
- Increase include patterns limit from 1,000 to 100,000 characters
- Auto-switch to Result tab when Re-pack button is clicked
- Fix re-pack loading state to use shared loading status
- Sort files by token count instead of character count
- Replace Package icon with custom SVG for re-pack button
- Add row hover effects and full-row click selection
- Implement proper file selection state management during re-pack
2025-08-24 15:27:07 +09:00
Kazuki Yamada
73983d2e27 chore(website): update repomix dependency to v1.4.0
Update repomix package from v1.2.0 to v1.4.0 to support the new
tokenCountTree option and other enhancements required for the
file selection feature.
2025-08-24 14:16:35 +09:00
Kazuki Yamada
c3f823f3e9 feat(website): enable comprehensive token counting for all files
Add tokenCountTree option to CLI configuration to ensure token counts
are calculated for all files in the repository, not just the top files.
This is required for the file selection feature to display accurate
token statistics for each individual file.

The tokenCountTree option enables complete token count generation
across the entire repository structure, supporting the selective
re-packing functionality.
2025-08-24 14:15:49 +09:00
Kazuki Yamada
896925d164 feat(website): increase rate limit for development environment
Adjusts RateLimiter configuration to allow more requests during development:
- Development: 10 requests per minute (increased from 3)
- Production: 3 requests per minute (unchanged)

This improves developer experience when testing file selection and
re-packing functionality without being overly restrictive during development.
2025-08-24 13:33:23 +09:00