Commit bf25767
committed
Implement Blob module (microsoft#9352)
* Added BlobModule and IWSModuleContHandler headers
* Implement Blob module
* Avoid raw self pointer in BlobModule
* Implement WebSocketModule msg processing
* clang format
* Don't return until websocketMessage event is sent
* Define CreateBlobModule()
* Add DEF exports
* Add Blob JS tests
* Add Blob JS tests
* Change files
* yarn lint
* Add overrides
* Register BlobModule in DesktopTestRunner
* Keep ignoring WebSocketBlob test by default
* Add BlobModule to default modules list
* Allow 'blob' responseType in HTTP module
* Ensure React Instance can be accessed when using older versions of react-native
* Emit error message on createFromParts failure
* Remove redundant extra modules in Desktop integration tests
* Declare IWebSocketModuleProxy
* Remove Blob and WS module factories from DLL boundary
* Implement IWebSocketModuleProxy
* clang format
* Update packages.lock
* Use winrt::array_view directly in ResolveMessage
* Define InstanceImpl::m_transitionalModuleProperties
* Include CreateModules.h in projects accessing MSRN.Cxx
* Define WinRT class WebSocketModuleContentHandler
- Have BlobModule constructor register the content handler in transitive
property bag CxxNativeModule/WebSocketModuleContentHandler
* Have WebSocketModule use IInspectable as props arg
* Use property bag instead of global singletons for blob helpers
* Store blob helpers in prop bag as weak_ptr
* Replace remaining lock_guard<mutex> in BlobModule
* Define IUriHandler, IReqBodyHandler, IRespHandler.
* IHttpResource::SendRequest - add folly::dynamic data arg
* Add data arg to test SendRequest calls
* First implementation for BlobModuleUriHandler
* Remove WebSocketModuleContentHandler WinRT class
* Implement IBlobPersistor, MemoryBlobPersistor
* clang format
* Update yarn.lock
* Update RctRootVieTagGen location
* Implement addNetworkingHandler
* Fix createFromParts buffer persistence
* Drop WebSocketModule s_sharedState in favor of property bag
* Disable back WebSocketBlob test
* Rename iProperties to inspectableProperties
* Pass ReactContext properties to CreateHttpModule in InstanceWin
* Remove WebSocketModule constructor from x86 DLL boundary
* yarn lint
* Update packages.lock
* Make transitional property bag non-member
* Use blobURIScheme wherever possible
* Pass request content as folly::dynaic.
- Pass request ID directly from JavaScript layer.
* Use constexpr for folly indexes
* Implement GetMimeTypeFromUri
* Finish BlobModule handler implementations.
* Remove unused includes
* Ensure HttpModule::m_resource is set
* clang format
* clang format
* Allow blob responseType
* Use winrt::to_hstring instead of Utf8ToUtf16
* Pass inspectableProperties down to WinRTHttpResource
* Implement IHttpModuleProxy via WinRTHttpResource
* Consume URI handler
- IHttpResource
- Rename SetOnRequest to SetOnRequestSuccess
- Declare SetOnBlobData to pass complex (non-string) response data
* Consume IRequestBodyHandler
* Consume IResponseHandler
* Ensure properties exist in bag before using value
* Update packages lock
* Add missing call to Modules::SendEvent
* Fix Shared filters
* Rename SetOnBlobData to SetOnData (different args)
* Correctly retrieve blob slices
* Correctly retrieve blob slices
* Clang format
* Update project filters
* Drop BlobModuleUriHandler
* Continue handling requests when not blob-supported
* Add BlobTest
* Update packages.lock.json
* Define FileReaderModule
* Implement FileReaderModule
* Complete BlobTest
* Make IBlobPersistor::ResolveMessage throw std::invalid_argument
* Fail on Content-Encoding parsing even if no error handler
* Remove MIME mappings. Currently unused
* MemoryBlobPersistor::ResolveMessage throw on out of bounds
* lint
* Enable BlobTest by default
* Disable Blob test in CI (may hang)1 parent 2a5fc3e commit bf25767
6 files changed
Lines changed: 678 additions & 605 deletions
File tree
- vnext
- Microsoft.ReactNative.Managed.UnitTests
- Microsoft.ReactNative.Managed
Lines changed: 17 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
84 | 99 | | |
85 | 100 | | |
86 | 101 | | |
87 | | - | |
| 102 | + | |
88 | 103 | | |
89 | 104 | | |
90 | 105 | | |
| |||
1790 | 1805 | | |
1791 | 1806 | | |
1792 | 1807 | | |
1793 | | - | |
| 1808 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
27 | 32 | | |
28 | 33 | | |
29 | 34 | | |
| |||
60 | 65 | | |
61 | 66 | | |
62 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
63 | 83 | | |
64 | 84 | | |
65 | 85 | | |
66 | | - | |
| 86 | + | |
67 | 87 | | |
68 | 88 | | |
69 | 89 | | |
70 | 90 | | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
71 | 96 | | |
72 | 97 | | |
73 | 98 | | |
| |||
303 | 328 | | |
304 | 329 | | |
305 | 330 | | |
306 | | - | |
| 331 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
| 71 | + | |
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
134 | | - | |
135 | | - | |
| 134 | + | |
| 135 | + | |
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
| |||
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
154 | 160 | | |
155 | 161 | | |
156 | 162 | | |
| |||
349 | 355 | | |
350 | 356 | | |
351 | 357 | | |
352 | | - | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
353 | 379 | | |
354 | 380 | | |
355 | 381 | | |
| |||
362 | 388 | | |
363 | 389 | | |
364 | 390 | | |
365 | | - | |
| 391 | + | |
366 | 392 | | |
367 | 393 | | |
368 | 394 | | |
| |||
0 commit comments