Commit graph

101 commits

Author SHA1 Message Date
Max
f7b8e970b2 Refactor Logging in Request Render Method
- Removed the dependency on the color package for logging warnings about uncached pages.
- Simplified the logging statement to directly use the log package, improving code clarity and reducing unnecessary imports.
2026-01-12 11:02:15 +08:00
Max
a37bb5cdba Enhance API Guards and Documentation
- Added a new guard option for OAuth 2.1 authentication, with ACL checks performed in the Run function for API calls.
- Updated the API routing to include the new guard and clarified the OAuth guard's functionality in the code comments.
- Enhanced documentation to reflect the new guard options and their descriptions, improving clarity for developers on available authentication methods.
2026-01-04 16:40:23 +08:00
Max
8485dd420e Refactor API Routing and Update Content-Type Header
- Added new root-level endpoints for team management, including listing and creating teams, while maintaining OAuth protection.
- Streamlined user-related endpoints by removing unnecessary groupings, enhancing clarity and accessibility.
- Updated the Content-Type header in the API response to application/json for better consistency with API standards.
2026-01-04 16:15:44 +08:00
Max
787954f0af Enhance OpenAPI Integration and API Routing
- Introduced support for OpenAPI mode, allowing dynamic routing and OAuth guards for API endpoints.
- Updated API root path handling to accommodate OpenAPI configurations, ensuring consistent URL structures.
- Added well-known routes for Yao metadata and OAuth discovery, improving API discoverability.
- Refactored middleware and guards to streamline OpenAPI integration, enhancing overall service functionality.
- Removed deprecated agent TypeScript file, simplifying the codebase and improving maintainability.
2026-01-04 15:46:09 +08:00
Max
097fb73416 Refactor SUI Command Arguments and Enhance Default Template Handling
- Updated the `build` and `watch` commands to accept a single argument for `<sui>` and made the `<template>` argument optional, improving usability.
- Introduced a default template assignment for the `agent` SUI, ensuring a more intuitive setup for users.
- Enhanced error messages for command usage to provide clearer guidance on expected input format.
- Added new OpenAPI file to the bindata, improving the framework's capabilities for API integration.
2026-01-01 10:28:45 +08:00
Max
c425b74383 Refactor error handling in various components to improve logging and message formatting
- Updated error messages to use fmt.Errorf with %s for better clarity and consistency.
- Enhanced logging statements to utilize formatted strings for improved readability.
- Refactored multiple Load functions across different modules to standardize error handling practices.
2025-09-28 10:24:17 +08:00
Max
77efc03582 feat: Enhance global build context and component handling
- Update NewGlobalBuildContext to accept a template parameter for improved context management.
- Refactor component handling in Compile method to include JIT components, enhancing dynamic component loading.
- Modify TemplateRender to utilize the updated global context, improving template processing.
- Adjust component attribute parsing to use "s:route" for better clarity in component identification.
2025-04-23 16:08:10 +08:00
Max
e59dacefa2 Improve error handling in request value execution
- Modify request value execution to log errors when method calls fail
- Prevent propagation of errors during value resolution
- Update error message in data merging to be more descriptive
2025-03-06 10:48:27 +08:00
Max
896e52a52a Fix PublicRoot bug and get Sid from request 2024-09-25 08:25:37 +08:00
Max
ddb337847e Refactor request guard to include page backend script execution 2024-09-24 08:00:05 +08:00
Max
0a21780473 Refactor component attribute handling to support spread operator and real-time rendering mode 2024-09-10 09:23:10 +08:00
Max
219f71b00e chore: Refactor TemplateRender to handle optional request parameters 2024-08-23 12:20:33 +08:00
Max
02651085d7 Improve SUI TemplateRender 2024-08-10 19:34:36 +08:00
Max
ce96d89c31 Improve SUI TemplateRender 2024-08-10 18:12:32 +08:00
Max
0f6bc06172 fix render public root bug 2024-08-10 17:18:35 +08:00
Max
80779bb0fc [feat] add SUI template.render process 2024-08-10 16:58:38 +08:00
Max
3bacc297cf chore: Fix error handling in Run function and improve page config loading 2024-08-06 16:31:56 +08:00
Max
9977b62a09 [feat] SUI $backend function call supports custom Guard 2024-08-05 08:32:59 +08:00
yflau
c35d623fc8 Merge branch 'main' of https://github.com/yflau/yao 2024-08-04 14:32:18 +08:00
yflau
1ac37b048f return 401 for invalid token 2024-08-04 12:54:05 +08:00
Max
d170ab6e53 Optimize $backend function call 2024-08-04 11:40:15 +08:00
Max
8e47849e93 [feat] Add $Backend function call to directly invoke backend functions from frontend scripts. 2024-08-03 20:31:02 +08:00
Max
259b707ca8 Refactor utils.ts for improved code readability and maintainability 2024-08-03 18:57:29 +08:00
Max
a07c1ece51 Add s:render feature for data update rendering (dev) 2024-08-02 21:18:02 +08:00
Max
fc1f80e0f5 feat: Add sourceRoots to Static struct in types.go 2024-08-01 18:16:59 +08:00
Max
6bcede11d9 Refactor SUI core to handle backend script errors during page execution 2024-07-26 16:02:35 +08:00
Max
7706439f8f Refactor SUI core to copy the script pointer to the request for page backend script execution 2024-07-25 19:07:50 +08:00
Max
276f29d777 [feat] SUI support BeforeRender hook for dataset processing, and deprecating the s:set method. 2024-07-25 17:56:40 +08:00
Max
58ca39a32b [feat] Sharing the Constants variable between frontend and backend scripts 2024-07-25 15:37:23 +08:00
Max
41495a2de0 fix sui test cases 2024-07-17 16:44:42 +08:00
Max
08f3fbc1e4 fix sui page locale and theme data caching bug 2024-07-16 04:53:01 +08:00
Max
b85e5eecd8 Fix the bug in the SUI language pack path 2024-07-15 16:57:28 +08:00
Max
ef8b8027cf [add] sui.trans.all and sui.trans.page to support automatic translation 2024-07-15 09:24:44 +08:00
Max
8dd5f02a7b feat: output warning messages during sui page build 2024-07-09 05:56:29 +08:00
Max
6542c6e46b refactor: optimize the SUI page compiler 2024-07-06 21:24:36 +08:00
Max
a4f28368d4 refactor: Update build process to include SUI CompileAsComponent support (dev) 2024-07-05 19:54:26 +08:00
Max
a435b1ad6e [chore] Update sui test cases 2024-07-04 17:06:42 +08:00
Max
28537e2163 [add] Support for JIT mode in SUI component imports ( dev ) 2024-07-02 20:40:35 +08:00
Max
671bba4aa4 [add] SUI language pack support (dev) 2024-06-28 11:25:22 +08:00
Max
c3644380ba refactor: Update Request struct to include data caching functionality 2024-06-27 21:11:38 +08:00
Max
6dcd704ea4 [add] Configuring SUI page caching to optimize static page loading speed 2024-06-27 20:02:03 +08:00
Max
a52f0ed1a4 refactor: Update Request struct to use NewData method for setting data 2024-06-26 18:19:51 +08:00
Max
0a5105b9d0 refactor: Update TemplateParser to support debug mode and DisableCache 2024-06-26 17:09:41 +08:00
Max
a1de910337 [add] support for retrieving cookies in sui Request struct 2024-06-25 19:37:55 +08:00
Max
a48c4cbe7d Refactor middleware and request handling code 2024-03-19 13:58:43 +08:00
Max
76b78e2102 [add] sui.sync.assetfile process 2024-03-13 19:39:53 +08:00
Max
b82f6f6029 Refactor build process and add data parameter to BuildOption 2024-02-28 21:21:56 +08:00
Max
2effd3c360 Update authorization error messages 2024-02-20 20:07:26 +08:00
Max
5104dab56b Add cookie-trace and cookie-jwt guards 2024-02-10 17:02:44 +08:00
Max
6ca148d76c Add support for rendering request data in template parser 2024-01-21 00:04:58 +08:00