Commit b73ca12
authored
Restructure backend (#439)
* chore: update dependencies
- Update uuid to ^11.1.0 and add @types/uuid
- Update @autonomys/file-caching to ^1.5.1
- Update related dependencies across packages
* feat: add HTTP range request utility functions
- Add parseByteRange function for parsing Range headers
- Add createPartialStream function for creating range-aware streams
- Add utility functions for handling HTTP 206 partial content responses
- Support for byte-range requests in readable streams
* feat: implement range request support in download services
- Add ByteRange interface for range request parameters
- Implement partial download support in memory cache
- Add range-aware download methods in download service
- Support for caching partial content with byte ranges
- Add sync download functionality with range support
* feat: add HTTP range request support to download controllers
- Update download controller to handle Range headers
- Implement HTTP 206 Partial Content responses
- Add proper Content-Range and Accept-Ranges headers
- Support partial file downloads in object controllers
- Update use cases to handle byte range parameters
- Add range request support to object download endpoints
* test: add comprehensive tests for partial retrieval functionality
- Add tests for byte range parsing and validation
- Test partial content download scenarios
- Verify HTTP 206 response handling
- Add test cases for range request edge cases
- Test memory cache integration with range requests
* refactor: move to separate files related logic
* refactor: enhance download response handling with byte range support
- Introduced isExpectedDocument function to streamline document expectation checks
- Refactored handleDownloadResponseHeaders to utilize setFileResponseHeaders and setFolderResponseHeaders for improved clarity
- Added byte range handling in setFileResponseHeaders for partial content responses
- Updated content disposition and content type settings based on encryption and document expectations
* refactor: reorganize file use cases
* fix(testing): cache populated in async setting
* feat: update auto files gateway version
* refactor: reorganize backend structure and update package references
- Updated package.json to reflect new paths for frontend and download server scripts.
- Refactored import paths in various test files to align with the new directory structure.
- Removed deprecated APIs and reorganized use cases and repositories for better clarity and maintainability.
- Deleted unused files and directories to streamline the codebase.
* refactor: re-structure core functionality placement
* update: bump auto-sdk version
* refactor: update FilesUseCases tests and imports
- Refactored tests for FilesUseCases to use getObjectInformation instead of getMetadata.
- Updated mock implementations to reflect changes in the download blocking logic.
- Cleaned up imports in files.spec.ts and index.ts for better organization and clarity.
* refactor: reorganize backend structure and update package references
- Updated package.json to reflect new paths for frontend and download server scripts.
- Refactored import paths in various test files to align with the new directory structure.
- Removed deprecated APIs and reorganized use cases and repositories for better clarity and maintainability.
- Deleted unused files and directories to streamline the codebase.
* refactor: re-structure core functionality placement
* refactor: clean up imports in files.spec.ts
- Removed unused dbMigration import to streamline the test file and improve clarity.
* fix: update byte range header handling in getByteRange function
- Changed the header used to retrieve the byte range from 'content-range' to 'range' for improved accuracy in handling byte range requests.
* fix: enhance byte range validation in getByteRange function
- Added validation checks to ensure start and end byte values are non-negative and that the start value does not exceed the end value, improving the robustness of byte range handling.
* chore: update package dependencies to version 1.5.11
* chore: update yarn.lock to reflect package versions 1.5.11 for auto-dag-data and file-caching
* feat: improved error management w/ neverthrow lib
* feat: enhance error logging in upload controller
* fix: improve error handling in async download process
* fix: enhance error handling in tagUpload function for folder uploads
* refactor: update logging in subscription controller to use trace level and return subscription value
* fix: improve error handling in async download tests and update tagUpload function for folder uploads
* fix: remove unused mock for error handling in async download tests
* fix: update error handling in dismissDownload function to return ForbiddenError for unauthorized users
* fix: handle result in update progress1 parent 1ae73d0 commit b73ca12
File tree
106 files changed
+2380
-1624
lines changed- backend
- __tests__
- e2e
- downloads
- objects
- uploads
- users
- unit
- repositories
- useCases
- utils
- src
- app
- apis
- controllers
- middlewares
- servers
- core
- downloads
- objects
- files
- uploads
- users
- errors
- http/controllers
- infrastructure
- drivers
- eventRouter
- processors
- repositories
- asyncDownloads
- objects
- uploads
- users
- services
- auth
- download
- memoryDownloadCache
- dsn
- fileGateway
- objectMappingListener
- upload
- onchainPublisher
- uploadProcessorCache
- useCases/objects/files
- packages/models/src/uploads
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
106 files changed
+2380
-1624
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
| 6 | + | |
| 7 | + | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
13 | 19 | | |
14 | 20 | | |
15 | 21 | | |
| |||
31 | 37 | | |
32 | 38 | | |
33 | 39 | | |
34 | | - | |
35 | | - | |
36 | | - | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
37 | 46 | | |
38 | 47 | | |
39 | 48 | | |
| |||
45 | 54 | | |
46 | 55 | | |
47 | 56 | | |
48 | | - | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
49 | 61 | | |
50 | 62 | | |
51 | 63 | | |
| |||
64 | 76 | | |
65 | 77 | | |
66 | 78 | | |
67 | | - | |
68 | | - | |
69 | | - | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
70 | 82 | | |
71 | 83 | | |
72 | 84 | | |
73 | | - | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
74 | 89 | | |
75 | 90 | | |
76 | | - | |
| 91 | + | |
77 | 92 | | |
78 | | - | |
79 | | - | |
80 | | - | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
81 | 96 | | |
82 | 97 | | |
83 | 98 | | |
| |||
104 | 119 | | |
105 | 120 | | |
106 | 121 | | |
107 | | - | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
108 | 126 | | |
109 | 127 | | |
110 | 128 | | |
| |||
138 | 156 | | |
139 | 157 | | |
140 | 158 | | |
141 | | - | |
142 | | - | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
143 | 163 | | |
144 | | - | |
145 | | - | |
146 | | - | |
| 164 | + | |
147 | 165 | | |
148 | | - | |
| 166 | + | |
| 167 | + | |
149 | 168 | | |
150 | 169 | | |
151 | 170 | | |
152 | | - | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
153 | 175 | | |
154 | 176 | | |
155 | 177 | | |
| |||
164 | 186 | | |
165 | 187 | | |
166 | 188 | | |
167 | | - | |
168 | | - | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
169 | 197 | | |
170 | 198 | | |
171 | 199 | | |
| |||
181 | 209 | | |
182 | 210 | | |
183 | 211 | | |
184 | | - | |
185 | | - | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
186 | 220 | | |
187 | 221 | | |
188 | 222 | | |
| |||
197 | 231 | | |
198 | 232 | | |
199 | 233 | | |
200 | | - | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
201 | 238 | | |
202 | 239 | | |
203 | | - | |
| 240 | + | |
204 | 241 | | |
205 | 242 | | |
206 | 243 | | |
207 | 244 | | |
208 | 245 | | |
209 | | - | |
| 246 | + | |
| 247 | + | |
210 | 248 | | |
211 | 249 | | |
212 | 250 | | |
| |||
215 | 253 | | |
216 | 254 | | |
217 | 255 | | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | 256 | | |
226 | 257 | | |
227 | | - | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
228 | 262 | | |
229 | 263 | | |
230 | 264 | | |
231 | 265 | | |
232 | | - | |
233 | | - | |
234 | | - | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
235 | 272 | | |
236 | 273 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | | - | |
29 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
| 2 | + | |
| 3 | + | |
4 | 4 | | |
5 | | - | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
| |||
11 | 10 | | |
12 | 11 | | |
13 | 12 | | |
14 | | - | |
| 13 | + | |
15 | 14 | | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
46 | | - | |
47 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
48 | 52 | | |
49 | 53 | | |
50 | 54 | | |
51 | 55 | | |
52 | | - | |
53 | | - | |
54 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
55 | 59 | | |
56 | 60 | | |
57 | 61 | | |
58 | 62 | | |
59 | | - | |
60 | | - | |
61 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
62 | 66 | | |
63 | 67 | | |
64 | 68 | | |
| |||
164 | 168 | | |
165 | 169 | | |
166 | 170 | | |
167 | | - | |
168 | | - | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
169 | 174 | | |
170 | 175 | | |
171 | 176 | | |
| |||
179 | 184 | | |
180 | 185 | | |
181 | 186 | | |
182 | | - | |
183 | | - | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
184 | 191 | | |
185 | 192 | | |
186 | 193 | | |
| |||
194 | 201 | | |
195 | 202 | | |
196 | 203 | | |
197 | | - | |
198 | | - | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
199 | 208 | | |
200 | 209 | | |
201 | 210 | | |
| |||
207 | 216 | | |
208 | 217 | | |
209 | 218 | | |
210 | | - | |
211 | | - | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
212 | 222 | | |
213 | 223 | | |
214 | 224 | | |
| |||
218 | 228 | | |
219 | 229 | | |
220 | 230 | | |
221 | | - | |
222 | | - | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
223 | 234 | | |
224 | 235 | | |
225 | 236 | | |
| |||
234 | 245 | | |
235 | 246 | | |
236 | 247 | | |
237 | | - | |
238 | | - | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
239 | 251 | | |
240 | 252 | | |
241 | 253 | | |
| |||
0 commit comments