@srcpush/react-native-code-push 1.0.3-develop.1 → 1.0.3-develop.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/package.json +1 -1
  2. package/.azurepipelines/build-rn-code-push-1es.yml +0 -104
  3. package/.azurepipelines/test-rn-code-push.yml +0 -94
  4. package/windows/CodePush/CodePush.def +0 -3
  5. package/windows/CodePush/CodePush.vcxproj +0 -198
  6. package/windows/CodePush/CodePush.vcxproj.filters +0 -91
  7. package/windows/CodePush/CodePushConfig.cpp +0 -104
  8. package/windows/CodePush/CodePushConfig.h +0 -66
  9. package/windows/CodePush/CodePushConfig.idl +0 -12
  10. package/windows/CodePush/CodePushDownloadHandler.cpp +0 -73
  11. package/windows/CodePush/CodePushDownloadHandler.h +0 -32
  12. package/windows/CodePush/CodePushNativeModule.cpp +0 -937
  13. package/windows/CodePush/CodePushNativeModule.h +0 -247
  14. package/windows/CodePush/CodePushPackage.cpp +0 -456
  15. package/windows/CodePush/CodePushPackage.h +0 -49
  16. package/windows/CodePush/CodePushTelemetryManager.cpp +0 -213
  17. package/windows/CodePush/CodePushTelemetryManager.h +0 -29
  18. package/windows/CodePush/CodePushUpdateUtils.cpp +0 -86
  19. package/windows/CodePush/CodePushUpdateUtils.h +0 -38
  20. package/windows/CodePush/CodePushUtils.cpp +0 -29
  21. package/windows/CodePush/CodePushUtils.h +0 -18
  22. package/windows/CodePush/FileUtils.cpp +0 -131
  23. package/windows/CodePush/FileUtils.h +0 -28
  24. package/windows/CodePush/PropertySheet.props +0 -16
  25. package/windows/CodePush/ReactPackageProvider.cpp +0 -15
  26. package/windows/CodePush/ReactPackageProvider.h +0 -22
  27. package/windows/CodePush/ReactPackageProvider.idl +0 -9
  28. package/windows/CodePush/miniz/LICENSE +0 -22
  29. package/windows/CodePush/miniz/miniz.c +0 -7657
  30. package/windows/CodePush/miniz/miniz.h +0 -1338
  31. package/windows/CodePush/miniz/readme.md +0 -37
  32. package/windows/CodePush/packages.config +0 -4
  33. package/windows/CodePush/pch.cpp +0 -1
  34. package/windows/CodePush/pch.h +0 -4
  35. package/windows-legacy/CodePush/CodePush.csproj +0 -128
  36. package/windows-legacy/CodePush/CodePushUtils.cs +0 -47
  37. package/windows-legacy/CodePush/FileUtils.cs +0 -40
  38. package/windows-legacy/CodePush/Properties/AssemblyInfo.cs +0 -29
  39. package/windows-legacy/CodePush/Properties/CodePush.rd.xml +0 -33
  40. package/windows-legacy/CodePush/UpdateManager.cs +0 -305
  41. package/windows-legacy/CodePush/UpdateUtils.cs +0 -46
  42. package/windows-legacy/CodePush.Net46/Adapters/Http/HttpProgress.cs +0 -28
  43. package/windows-legacy/CodePush.Net46/Adapters/Storage/ApplicationDataContainer.cs +0 -106
  44. package/windows-legacy/CodePush.Net46/CodePush.Net46.csproj +0 -103
  45. package/windows-legacy/CodePush.Net46/CodePushUtils.cs +0 -158
  46. package/windows-legacy/CodePush.Net46/FileUtils.cs +0 -55
  47. package/windows-legacy/CodePush.Net46/Properties/AssemblyInfo.cs +0 -36
  48. package/windows-legacy/CodePush.Net46/UpdateManager.cs +0 -330
  49. package/windows-legacy/CodePush.Net46/UpdateUtils.cs +0 -70
  50. package/windows-legacy/CodePush.Net46/packages.config +0 -5
  51. package/windows-legacy/CodePush.Net46.Test/ApplicationDataContainerTest.cs +0 -105
  52. package/windows-legacy/CodePush.Net46.Test/CodePush.Net46.Test.csproj +0 -137
  53. package/windows-legacy/CodePush.Net46.Test/Properties/AssemblyInfo.cs +0 -36
  54. package/windows-legacy/CodePush.Net46.Test/TelemetryManagerTest.cs +0 -117
  55. package/windows-legacy/CodePush.Net46.Test/app.config +0 -11
  56. package/windows-legacy/CodePush.Net46.Test/packages.config +0 -4
  57. package/windows-legacy/CodePush.Shared/CodePush.Shared.projitems +0 -22
  58. package/windows-legacy/CodePush.Shared/CodePush.Shared.shproj +0 -13
  59. package/windows-legacy/CodePush.Shared/CodePushConstants.cs +0 -35
  60. package/windows-legacy/CodePush.Shared/CodePushNativeModule.cs +0 -329
  61. package/windows-legacy/CodePush.Shared/CodePushReactPackage.cs +0 -235
  62. package/windows-legacy/CodePush.Shared/CodePushUtils.cs +0 -70
  63. package/windows-legacy/CodePush.Shared/InstallMode.cs +0 -9
  64. package/windows-legacy/CodePush.Shared/MinimumBackgroundListener.cs +0 -44
  65. package/windows-legacy/CodePush.Shared/SettingsManager.cs +0 -148
  66. package/windows-legacy/CodePush.Shared/TelemetryManager.cs +0 -250
  67. package/windows-legacy/CodePush.Shared/UpdateState.cs +0 -9
@@ -1,12 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT License.
3
-
4
- namespace Microsoft.CodePush.ReactNative
5
- {
6
- [webhosthidden]
7
- [default_interface]
8
- runtimeclass CodePushConfig {
9
- static void Init(IMap<String, String> configMap);
10
- static void SetHost(Microsoft.ReactNative.ReactNativeHost host);
11
- };
12
- } // namespace CppModule
@@ -1,73 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT License.
3
-
4
- #include "pch.h"
5
-
6
- #include "winrt/Windows.Data.Json.h"
7
- #include "winrt/Windows.Foundation.h"
8
- #include "winrt/Windows.Storage.h"
9
- #include "winrt/Windows.Storage.Streams.h"
10
- #include "winrt/Windows.Web.Http.h"
11
- #include "winrt/Windows.Web.Http.Headers.h"
12
-
13
- #include "CodePushDownloadHandler.h"
14
-
15
- namespace Microsoft::CodePush::ReactNative
16
- {
17
- using namespace winrt;
18
- using namespace Windows::Data::Json;
19
- using namespace Windows::Foundation;
20
- using namespace Windows::Storage;
21
- using namespace Windows::Storage::Streams;
22
- using namespace Windows::Web::Http;
23
-
24
- CodePushDownloadHandler::CodePushDownloadHandler(
25
- StorageFile downloadFile,
26
- std::function<void(int64_t, int64_t)> progressCallback) :
27
- receivedContentLength(0),
28
- expectedContentLength(0),
29
- progressCallback(progressCallback),
30
- downloadFile(downloadFile) {}
31
-
32
- IAsyncOperation<bool> CodePushDownloadHandler::Download(std::wstring_view url)
33
- {
34
- HttpClient client;
35
-
36
- auto headers{ client.DefaultRequestHeaders() };
37
- headers.Append(L"Accept-Encoding", L"identity");
38
-
39
- HttpRequestMessage reqm{ HttpMethod::Get(), Uri(url) };
40
- auto resm{ co_await client.SendRequestAsync(reqm, HttpCompletionOption::ResponseHeadersRead) };
41
- expectedContentLength = resm.Content().Headers().ContentLength().GetInt64();
42
- auto inputStream{ co_await resm.Content().ReadAsInputStreamAsync() };
43
- auto outputStream{ co_await downloadFile.OpenAsync(FileAccessMode::ReadWrite) };
44
-
45
- uint8_t header[4] = {};
46
-
47
- for (;;)
48
- {
49
- auto outputBuffer{ co_await inputStream.ReadAsync(Buffer{ BufferSize }, BufferSize, InputStreamOptions::None) };
50
-
51
- if (outputBuffer.Length() == 0)
52
- {
53
- break;
54
- }
55
- co_await outputStream.WriteAsync(outputBuffer);
56
-
57
- if (receivedContentLength < ARRAYSIZE(header))
58
- {
59
- for (uint32_t i{ static_cast<uint32_t>(receivedContentLength) }; i < min(ARRAYSIZE(header), outputBuffer.Length()); i++)
60
- {
61
- header[i] = outputBuffer.data()[i];
62
- }
63
- }
64
-
65
- receivedContentLength += outputBuffer.Length();
66
-
67
- progressCallback(/*expectedContentLength*/ expectedContentLength, /*receivedContentLength*/ receivedContentLength);
68
- }
69
-
70
- bool isZip{ header[0] == 'P' && header[1] == 'K' && header[2] == 3 && header[3] == 4 };
71
- co_return isZip;
72
- }
73
- }
@@ -1,32 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT License.
3
-
4
- #pragma once
5
-
6
- #include "winrt/Windows.Storage.h"
7
- #include "winrt/Windows.Foundation.h"
8
- #include "winrt/Windows.Data.Json.h"
9
- #include <string_view>
10
- #include <functional>
11
-
12
- namespace Microsoft::CodePush::ReactNative
13
- {
14
- struct CodePushDownloadHandler
15
- {
16
- winrt::Windows::Storage::StorageFile downloadFile;
17
- int64_t expectedContentLength;
18
- int64_t receivedContentLength;
19
- std::function<void(int64_t, int64_t)> progressCallback;
20
- std::wstring_view downloadUrl;
21
-
22
- CodePushDownloadHandler(
23
- winrt::Windows::Storage::StorageFile downloadFile,
24
- std::function<void(int64_t, int64_t)> progressCallback);
25
-
26
- // Returns true if the downloaded file is a zip file
27
- winrt::Windows::Foundation::IAsyncOperation<bool> Download(std::wstring_view url);
28
-
29
- private:
30
- static constexpr uint32_t BufferSize{ 256 * 1024 };
31
- };
32
- }