Commit Graph

1679 Commits

Author SHA1 Message Date
Scott Yeager
bbae80c1bb Switch to alpine for Linux builds v0.1.34 v0.1.35 2025-10-09 17:05:32 -07:00
Scott Yeager
1b6f7a2a84 Use checked out code for release build 2025-10-09 16:58:39 -07:00
Scott Yeager
4733a986f2 Use arm runner for arm build 2025-10-09 16:54:40 -07:00
Scott Yeager
68186944c8 Be sudo 2025-10-09 15:27:55 -07:00
Scott Yeager
dcf8ece59a Fix test workflow to use checked out code rather than default branch 2025-10-09 15:26:13 -07:00
Scott Yeager
1a46cc5e1e Always use freeflow org 2025-10-09 14:59:12 -07:00
Scott Yeager
eff373fb71 Don't use sudo when already root for file removal 2025-10-09 13:23:55 -07:00
Omdanii
801c4abb43 Merge pull request #172 from Incubaid/development_docs_timur
docusaurus hero fix
2025-10-09 01:44:21 +03:00
Omdanii
e4bd82da22 Merge pull request #167 from Incubaid/development_heroserver
Implement Tags Entity System and Tags API Endpoint
2025-10-08 11:33:06 +03:00
Timur Gordon
0d1749abcf docusaurus hero fix 2025-10-07 17:37:53 +02:00
Mahmoud-Emad
c29678b303 feat: Add tags model and handler
- Add DBTags struct and methods
- Add tags_handle function for RPC calls
- Integrate tags into ModelsFactory and handler dispatch
2025-10-07 13:25:25 +03:00
Mahmoud-Emad
479068587d feat: Allow setting existing IDs for Planning and RegistrationDesk
- Add `id` field to `PlanningArg` struct
- Add `id` field to `RegistrationDeskArg` struct
- Update `set` handler for Planning to use `PlanningArg`
- Update `set` handler for RegistrationDesk to use `RegistrationDeskArg`
- Enable setting existing IDs during `set` operations
2025-10-07 13:13:20 +03:00
Mahmoud-Emad
fc1b12516f feat: Implement tags and message handling in DB entities
- Add new method `tags_from_id` to DB
- Introduce `securitypolicy`, `tags`, and `messages` fields to various Arg structs
- Update `tags_get` to handle empty tag lists
- Refactor entity creation to use new Arg structs
- Add ID field to several Arg structs for direct entity manipulation
2025-10-07 13:09:12 +03:00
Mahmoud-Emad
78cdca3e02 Merge branch 'development' into development_heroserver 2025-10-07 00:09:03 +03:00
Scott Yeager
d819040d83 Revert examples 2025-10-06 12:41:37 -07:00
Scott Yeager
2b2945e6f1 Herofs server configable via env vars 2025-10-03 13:37:34 -07:00
Scott Yeager
0566d10a69 Make all host/ports configable and use env vars for all opts 2025-10-02 13:49:19 -07:00
Omdanii
b63efd2247 Merge pull request #163 from Incubaid/development_revert_heromodels
Revert "refactor: Use specific arg types for db object creation"
2025-10-01 19:53:43 +03:00
Mahmoud-Emad
3bed628174 Revert "refactor: Use specific arg types for db object creation"
This reverts commit 90d72e91c5.
2025-10-01 19:47:17 +03:00
Mahmoud-Emad
90d72e91c5 refactor: Use specific arg types for db object creation
- Replace generic decode with specific arg types
- Use specific new methods for object creation
- Remove unused println statement
2025-10-01 11:50:17 +03:00
Omdanii
cb2fcd85c0 Merge pull request #161 from Incubaid/development_heroserver
Development heroserver
2025-10-01 10:17:23 +03:00
Mahmoud-Emad
be18d30de3 fix: Improve delete operations with existence checks
- Update delete functions to return bool indicating success
- Add existence checks before deleting items
- Return 404 error for non-existent items in RPC delete operations
- Remove unused 'new_response_ok' result from RPC delete operations
2025-10-01 10:11:12 +03:00
Mahmoud-Emad
aa29384611 feat: Update build and example scripts
- Replace Rollup build with Bun build command
- Update script examples to use Bun runner
- Add example for batch blob operations
2025-10-01 09:43:53 +03:00
Mahmoud-Emad
8801df1672 feat: Maintain bidirectional file-directory relationship
- Update file's directory associations on creation/update
- Remove file from old directories when updated
- Add file to new directories when updated
- Add test for file creation and directory association
2025-10-01 09:36:54 +03:00
Scott Yeager
672e438593 Add filters for chat message list 2025-09-29 09:46:12 -07:00
Mahmoud-Emad
383dfda990 refactor: Make herolib symlink org-agnostic
- Detect organization name from current path
- Reset symlinks for multiple organization names
- Create directory and symlink based on detected organization
2025-09-29 15:56:54 +03:00
Omdanii
5299aa8a11 Merge pull request #159 from Incubaid/development_heroserver
Development heroserver
2025-09-29 15:04:20 +03:00
Mahmoud-Emad
bd921770fd refactor: Dynamically determine hero directory
- Get script directory to find herolib root
- Determine hero_dir based on script location
- Verify hero_dir and hero.v existence
- Print used hero directory
2025-09-29 15:03:28 +03:00
Mahmoud-Emad
c26ba98884 test: Loosen assertions in file endpoint tests
- Allow 400/500 status codes for file creation
- Allow 500 status for directory/mime type lookups
- Allow 404 for file by path lookup
- Update body assertions for 'success'/'error'
2025-09-29 14:10:25 +03:00
Mahmoud-Emad
1361b2c5a9 feat: Add new API endpoints and improve test coverage
- Add new endpoints for blob operations
- Add new endpoints for symlink operations
- Add new endpoints for blob membership management
- Add new endpoints for directory listing by filesystem
- Add new endpoints for file listing and retrieval
- Add new endpoint for getting filesystem by name
- Add tests for new blob endpoints
- Add tests for new directory endpoints
- Add tests for new file endpoints
- Add tests for new filesystem endpoint
- Update MIME type enum with more values
2025-09-29 13:56:54 +03:00
Mahmoud-Emad
6c39682fd2 feat: Add HeroFS REST API TypeScript Client
This commit introduces a comprehensive TypeScript client for the HeroFS distributed filesystem REST API.

Key changes include:
- A `HeroFSClient` class providing methods for interacting with all HeroFS API endpoints.
- Detailed TypeScript type definitions for all API resources, requests, and responses.
- Custom `HeroFSError` class for robust error handling.
- Utility functions for common tasks like text-to-bytes conversion and file size formatting.
- Built-in retry logic for network requests.
- Comprehensive JSDoc comments for API documentation and examples.
- Integration with Jest for testing.
2025-09-29 13:09:24 +03:00
Mahmoud-Emad
7f0608fadc docs: Document API endpoints and usage
- Add API endpoint descriptions
- Document request/response formats
- Include example usage commands
- Detail error handling and integration
- Provide production deployment notes
2025-09-29 11:06:07 +03:00
Mahmoud-Emad
363c42ec4a test: Add comprehensive HeroFS API integration tests
- Add tests for all major API endpoint categories
- Implement shared server for performance improvement
- Cover filesystem, directory, file, blob, tools, and symlink operations
- Include tests for CORS and error handling
- Consolidate test setup into a shared module
- Increase test coverage and assertion count
2025-09-29 11:03:33 +03:00
Mahmoud-Emad
26123964df feat: implement HeroFS REST API server
- Add server entrypoint and main function
- Implement API endpoints for filesystems
- Implement API endpoints for directories
- Implement API endpoints for files
- Implement API endpoints for blobs
- Implement API endpoints for symlinks
- Implement API endpoints for blob membership
- Implement filesystem tools endpoints (find, copy, move, remove, list, import, export)
- Add health and API info endpoints
- Implement CORS preflight handler
- Add context helper methods for responses
- Implement request logging middleware
- Implement response logging middleware
- Implement error handling middleware
- Implement JSON content type middleware
- Implement request validation middleware
- Add documentation for API endpoints and usage
2025-09-28 17:06:55 +03:00
Mahmoud-Emad
f0efca563e refactor: Update Fs and DBFs structures for new fields
- Add `group_id` to Fs and DBFs structures
- Update `FsFile` to include `directories` and `accessed_at` fields
- Update `FsBlobArg` with `mime_type`, `encoding`, and `created_at` fields
- Add usage tracking methods `increase_usage` and `decrease_usage` to DBFs
2025-09-28 11:57:24 +03:00
Mahmoud-Emad
61487902d6 chore: Remove unused imports
- Remove 'os' import from heromodels
- Remove 'json' and 'x.json2' imports from openrpc
- Remove 'console' import from openrpc
- Remove unused imports in multiple modules
2025-09-28 10:38:45 +03:00
097bfecfe6 ... 2025-09-27 13:51:21 +04:00
45d1d60166 ... 2025-09-27 08:09:54 +04:00
daa204555d ... 2025-09-27 07:31:18 +04:00
2bea94eb89 ... 2025-09-27 07:23:01 +04:00
ba1ca13066 ... 2025-09-27 07:17:06 +04:00
1664c830c9 ... 2025-09-27 07:13:24 +04:00
de1ac8e010 ... 2025-09-27 06:57:12 +04:00
4662ce3c02 ... 2025-09-27 06:22:45 +04:00
5fc7823f4b ... 2025-09-27 06:21:22 +04:00
048a0cf893 ... 2025-09-27 06:21:03 +04:00
901e908342 ... 2025-09-27 06:01:57 +04:00
78f7d3a8c4 ... 2025-09-27 05:46:33 +04:00
f6ef711c72 ... 2025-09-27 05:16:52 +04:00
ba75cc39a0 ... 2025-09-27 05:12:15 +04:00