Commit graph

47 commits

Author SHA1 Message Date
ccbikai
5f9cd9675d feat(test): migrate to cloudflare worker test suite
Modernizes testing infrastructure with dedicated Cloudflare Workers test pool:

- Replaces Nuxt Test Utils with @cloudflare/vitest-pool-workers
- Adds structured test organization for API endpoints
- Introduces comprehensive testing patterns and examples
- Implements schema-based test data generation with zod-mock
- Enhances test utilities with proper CF Workers environment

The new testing setup provides better isolation, more realistic worker runtime environment, and improved test data management through structured schemas and generators.
2025-05-29 20:54:44 +08:00
ccbikai
0b9960b5d8 chore: update project configuration and dependencies
- Adds new path aliases for improved code organization
- Updates dependencies to latest versions including vue-sonner v2.0.0
- Removes sourcemap configuration from Nuxt config
- Enhances API documentation with OpenAPI schemas
- Removes unused security schemes and Wrangler configuration

These changes modernize the project setup while improving documentation and removing unnecessary configurations.
2025-05-22 19:41:25 +08:00
ccbikai
e933a6cfd5 feat: update security scheme references in OpenAPI metadata 2025-05-21 20:34:02 +08:00
ccbikai
7ddbbbbca4 feat: add OpenAPI metadata to endpoints
Enhances API documentation by adding OpenAPI metadata to location and verify endpoints. Includes:

- Security requirements for both endpoints
- Detailed description of endpoint purposes
- Response documentation for verify endpoint with success/error cases
2025-05-21 20:31:12 +08:00
ccbikai
61fec839e4 chore: eslint 2025-05-21 19:54:54 +08:00
ccbikai
55753ec8bc feat: update dependencies and enhance API documentation in Nuxt configuration 2025-05-20 19:27:27 +08:00
ccbikai
9106881448 fix: clean up globe arcs and prevent empty stats display
- Adds cleanup timer for globe arcs to prevent accumulation
- Conditionally renders chart header when stats are available
- Improves event handling in AnimatedList by passing props
- Fixes traffic event animation by clearing previous timeouts

These changes improve visualization performance and user experience by preventing memory leaks from accumulated arcs and ensuring smoother animations.
2025-05-18 21:17:19 +08:00
ccbikai
852755ee1d feat: enhance globe visualization with traffic arcs
Adds real-time visualization of traffic flow between user locations and data centers on the 3D globe:

- Implements arc animations for traffic visualization
- Adjusts globe colors and atmosphere for better visibility
- Adds data center (colo) location mapping
- Centers initial view on user's current location
- Improves mobile responsiveness and layout
- Adds cleanup handling for globe resources

Performance and UX improvements:
- Optimizes globe rotation speed and controls
- Updates time picker layout with logical grouping
- Enhances responsive design for dashboard components
2025-05-18 20:50:56 +08:00
ccbikai
0dd263c354 feat: enhance realtime dashboard with time filters
Implements comprehensive time filtering and visualization improvements:

- Adds time range picker with presets from 5min to 24h
- Enhances chart visualization with minute-level granularity
- Updates globe visualization to respond to time/filter changes
- Implements animated event log display
- Swaps primary/secondary color scheme for better contrast

Improves realtime data handling with automatic updates and proper cleanup on unmount. Includes i18n support for new time picker UI across all supported languages.
2025-05-18 19:06:28 +08:00
ccbikai
f05393cc2e Merge branch 'master' into realtime 2025-05-16 19:03:16 +08:00
ccbikai
507a4d9a23 feat: add COLO field to access log tracking
Add Cloudflare COLO data to the access log tracking system to capture datacenter location information. This enables better monitoring of request distribution across Cloudflare's global infrastructure.

The COLO field is mapped to blob16 in the blobs map and populated from the Cloudflare request headers.
2025-05-16 19:02:14 +08:00
ccbikai
3456e69366 feat: enhance realtime globe functionality
- Reintroduced the realtime dashboard tab in the navigation menu.
- Updated Globe component to utilize geographic coordinates for live session locations.
- Added dynamic resizing for the globe based on viewport width.
- Implemented stop rotation feature on mouse down for better user interaction.
- Cleaned up commented code and improved type definitions in event logging.
2025-05-11 21:53:23 +08:00
ccbikai
7291beafea Merge branch 'preview' into realtime 2025-05-11 18:58:02 +08:00
ccbikai
dc23ff02a2 feat: add latitude/longitude to access logs
Extends access logging system to support geographic coordinates:
- Adds `doublesMap` for latitude/longitude data
- Updates type definitions to handle numeric values
- Implements conversion functions for double values
- Captures coordinates from Cloudflare headers

Enhances analytics capabilities for real-time globe visualization
2025-05-11 18:33:47 +08:00
ccbikai
63cd5e9503 feat: add realtime log and globe 2025-05-11 17:48:46 +08:00
ccbikai
e4a0abdebb fix: update link schema import path
Changes import path from '@/' to '@@/' to align with
correct module resolution configuration
2025-05-11 13:46:55 +08:00
ccbikai
d4d088521a Merge branch 'master' of github.com:WuChenDi/Sink into WuChenDi-master 2025-05-11 13:40:19 +08:00
面条
a166c30532
Merge pull request #126 from toeydevelopment/master
feat: Add upsert API endpoint for link management
2025-05-11 13:25:46 +08:00
wiresslend
11fdaeeb19
solve not being able to correctly obtain CF IP 2025-04-15 11:12:53 +08:00
wudi
7cadbfe2b1 refactor: Migrate project files and directories to the app directory using the new compatibilityVersion: 4 feature
- Moved `app.config.ts` to the `app` directory
- Migrated `.vue` files and other assets to the `app` directory
- Updated import paths to reflect the new file locations
2025-03-24 11:05:59 +08:00
anirut.k
c1ac0bf9f3 feat: implement link upsert API endpoint
- Adds a new API endpoint for creating and retrieving links
- Validates link data using LinkSchema
- Supports case sensitivity for link slugs
- Handles existing links by returning the short link and status
- Creates new links with expiration metadata in Cloudflare KV store
2025-03-21 13:45:41 +07:00
ccbikai
71654dcbc8 feat: add bot traffic filtering for access logs
Adds configuration option NUXT_DISABLE_BOT_ACCESS_LOG to exclude bot/crawler traffic from access statistics

- Updates ua-parser-js to stable v2.0.3
- Detects bots via CloudFlare bot management and user agent analysis
- Documents new config option in configuration.md and FAQs
2025-03-16 12:57:05 +08:00
ccbikai
1eb22503e6 fix: enable multiple filter values via comma separator
Updates query filter to support multiple values by splitting on commas.
Removes debug logging statement for cleaner code.

The change allows for more flexible query filtering by accepting
comma-separated values instead of single values only.
2025-03-02 13:47:50 +08:00
ccbikai
2a6b875bdb feat: consolidate time filtering and add advanced filters
Refactors time-based filtering by combining startAt/endAt into a single time object
Adds support for additional filter types in stats API queries
Implements deep watching for both time and filter changes

Improves code organization and maintainability while enabling more flexible data filtering
2025-03-02 13:40:43 +08:00
ccbikai
8d1bf6a451 feat: improve case-sensitive slug handling
Refactors URL slug case sensitivity implementation:
- Moves case conversion to creation time instead of lookup
- Updates middleware to handle case sensitivity more efficiently
- Adds configuration docs for case sensitivity and list query limits
- Simplifies nanoid implementation to always use lowercase

This change improves performance and consistency in URL handling while maintaining backwards compatibility with existing links.
2024-12-25 12:15:00 +08:00
ccbikai
da16f24577 style: eslint 2024-12-24 21:10:36 +08:00
ccbikai
465aa3292a fix: Increases KV list limit for better data retrieval
Expands the limit of the KV.list call from 1 to 1000.

This enhancement allows for more efficient data retrieval, reducing the number of requests needed to fetch all relevant entries.

Improves performance in scenarios with a large number of links.
2024-12-23 21:09:00 +08:00
ccbikai
842a8ab561 feat: Add link search function 2024-12-23 20:57:16 +08:00
ccbikai
7ab62c6a07 feat: add debug log for case-insensitive slug fallback
Adds logging when a case-insensitive URL slug fallback is attempted. This helps track when and how often the fallback mechanism is used.

Also improves code readability by renaming variable to match camelCase convention.
2024-12-15 20:38:32 +08:00
面条
8941fe3962
Merge pull request #88 from ZL-Asica/feature/case-sensitive
feat: add case sensitivity configuration for slugs
2024-12-15 20:35:57 +08:00
ccbikai
e7d71b35d3 feat: add short link to edit link response
Enhances link edit endpoint by including a fully-qualified short link URL in the response, constructed from request protocol and host alongside the slug
2024-12-08 14:44:03 +08:00
ccbikai
337f8f174c fix: refine link creation response structure
Returns link object separately from shortLink in response to maintain clearer API structure and prevent unnecessary data duplication in the response payload
2024-12-08 12:01:17 +08:00
ccbikai
172956b532 feat: add short link to create endpoint response
Enhances the link creation API response by including a formatted short link URL
Combines protocol, host, and slug to create a complete, ready-to-use short URL
2024-12-08 11:56:03 +08:00
ccbikai
19e18546de fix: adjust cursor handling for KV pagination
Moves undefined fallback from client to server side for cursor parameter
Ensures consistent pagination behavior when fetching links from KV storage

This prevents potential edge cases where undefined cursor values could be handled differently between client and server.
2024-12-08 11:37:04 +08:00
ZL Asica
899323faf6
chore: pre-check if slug is same before and after lowercase. 2024-12-06 15:11:07 -06:00
ZL Asica
902fc1bef5
fix: forward compability for case sensitive 2024-12-06 10:19:40 -06:00
ZL Asica
326939feee
feat: add config to switch case sensitivities 2024-12-02 20:24:47 -06:00
Manuel Osorio
cae1828da1
feat: remove leading and trailing slash from slug 2024-09-29 15:10:17 -04:00
ccbikai
b116d4c007 feat: enable AI integration and update dependencies
- Activated AI functionality in Nuxt configuration
- Updated AI model to a newer version for enhanced performance
- Bumped @nuxthub/core to 0.7.3 for critical bug fixes and improvements
2024-08-18 19:01:14 +08:00
ccbikai
52187d1ff6 feat: disable query string redirection by default
Enhances security and performance by preventing query strings from being carried over during redirection, aligning with best practices.
2024-07-20 18:34:49 +08:00
ccbikai
2876385f20 feat: add link cache TTL for performance optimization
Improves response times by introducing a configurable link cache TTL, defaulting to 60 seconds, to ensure quick access to frequently requested links while maintaining responsiveness to updates.
2024-07-20 18:21:40 +08:00
ccbikai
3c0a7be6eb style: remove unnecessary newline for cleaner code 2024-07-20 18:13:05 +08:00
面条
6b3dd8d47e
Merge pull request #23 from dr-data/main
link first
2024-07-20 18:02:24 +08:00
dr-data
ca12fdd876 link first 2024-07-15 00:20:15 +08:00
dr-data
21d8352de0 link first 2024-07-15 00:16:45 +08:00
ccbikai
01be05c0fc chore: Update package dependencies and optimize imports 2024-07-08 20:28:38 +08:00
ccbikai
bd47e755d5 feat: init 2024-05-25 08:09:30 +08:00