@appzung/react-native-code-push 9.0.2 → 10.0.0-rc1

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 (191) hide show
  1. package/CodePush.js +22 -19
  2. package/LICENSE.md +1 -1
  3. package/README.md +159 -298
  4. package/android/app/.gradle/config.properties +2 -0
  5. package/android/app/build.gradle +1 -1
  6. package/android/app/local.properties +8 -0
  7. package/android/app/src/main/java/com/microsoft/codepush/react/CodePush.java +27 -21
  8. package/android/app/src/main/java/com/microsoft/codepush/react/CodePushBuilder.java +5 -5
  9. package/android/app/src/main/java/com/microsoft/codepush/react/CodePushConstants.java +1 -1
  10. package/android/app/src/main/java/com/microsoft/codepush/react/CodePushDialog.java +1 -1
  11. package/android/app/src/main/java/com/microsoft/codepush/react/CodePushInstallMode.java +2 -2
  12. package/android/app/src/main/java/com/microsoft/codepush/react/CodePushInvalidPublicKeyException.java +2 -2
  13. package/android/app/src/main/java/com/microsoft/codepush/react/CodePushInvalidUpdateException.java +1 -1
  14. package/android/app/src/main/java/com/microsoft/codepush/react/CodePushMalformedDataException.java +2 -2
  15. package/android/app/src/main/java/com/microsoft/codepush/react/CodePushNativeModule.java +5 -5
  16. package/android/app/src/main/java/com/microsoft/codepush/react/CodePushNotInitializedException.java +2 -2
  17. package/android/app/src/main/java/com/microsoft/codepush/react/CodePushTelemetryManager.java +14 -14
  18. package/android/app/src/main/java/com/microsoft/codepush/react/CodePushUnknownException.java +2 -2
  19. package/android/app/src/main/java/com/microsoft/codepush/react/CodePushUpdateManager.java +1 -1
  20. package/android/app/src/main/java/com/microsoft/codepush/react/CodePushUpdateState.java +2 -2
  21. package/android/app/src/main/java/com/microsoft/codepush/react/CodePushUpdateUtils.java +1 -1
  22. package/android/app/src/main/java/com/microsoft/codepush/react/CodePushUtils.java +1 -1
  23. package/android/app/src/main/java/com/microsoft/codepush/react/DownloadProgress.java +1 -1
  24. package/android/app/src/main/java/com/microsoft/codepush/react/DownloadProgressCallback.java +1 -1
  25. package/android/app/src/main/java/com/microsoft/codepush/react/FileUtils.java +1 -1
  26. package/android/app/src/main/java/com/microsoft/codepush/react/ReactInstanceHolder.java +1 -1
  27. package/android/app/src/main/java/com/microsoft/codepush/react/SettingsManager.java +1 -1
  28. package/android/app/src/main/java/com/microsoft/codepush/react/TLSSocketFactory.java +1 -1
  29. package/android/build.gradle +1 -1
  30. package/android/codepush.gradle +3 -3
  31. package/docs/advanced-usage.md +56 -0
  32. package/docs/api-android.md +12 -75
  33. package/docs/api-ios.md +5 -17
  34. package/docs/api-js.md +18 -55
  35. package/docs/setup-android.md +15 -397
  36. package/docs/setup-ios.md +24 -198
  37. package/docs/setup-windows.md +7 -74
  38. package/ios/CodePush/CodePush.h +4 -4
  39. package/ios/CodePush/CodePush.m +8 -8
  40. package/ios/CodePush/CodePushConfig.m +14 -11
  41. package/ios/CodePush/CodePushPackage.m +60 -60
  42. package/ios/CodePush/CodePushTelemetryManager.m +13 -13
  43. package/ios/CodePush.xcodeproj/project.pbxproj +1 -562
  44. package/package.json +27 -24
  45. package/react-native.config.js +1 -1
  46. package/scripts/generateBundledResourcesHash.js +1 -1
  47. package/scripts/getFilesInFolder.js +1 -1
  48. package/scripts/recordFilesBeforeBundleCommand.js +1 -1
  49. package/typings/react-native-code-push.d.ts +22 -22
  50. package/windows/CodePush/CodePushConfig.cpp +3 -3
  51. package/windows/CodePush/CodePushConfig.h +3 -3
  52. package/windows/CodePush/CodePushNativeModule.cpp +27 -27
  53. package/windows/CodePush/CodePushNativeModule.h +4 -4
  54. package/windows/CodePush/CodePushTelemetryManager.cpp +12 -12
  55. package/windows/CodePush/CodePushTelemetryManager.h +1 -1
  56. package/.azurepipelines/build-rn-code-push-1es.yml +0 -104
  57. package/.azurepipelines/test-rn-code-push.yml +0 -94
  58. package/.config/CredScanSuppressions.json +0 -14
  59. package/SECURITY.md +0 -41
  60. package/docs/multi-deployment-testing-android.md +0 -148
  61. package/docs/multi-deployment-testing-ios.md +0 -59
  62. package/ios/CodePush/Base64/Base64/MF_Base64Additions.h +0 -34
  63. package/ios/CodePush/Base64/Base64/MF_Base64Additions.m +0 -252
  64. package/ios/CodePush/Base64/README.md +0 -47
  65. package/ios/CodePush/JWT/Core/Algorithms/Base/JWTAlgorithm.h +0 -69
  66. package/ios/CodePush/JWT/Core/Algorithms/Base/JWTAlgorithmFactory.h +0 -16
  67. package/ios/CodePush/JWT/Core/Algorithms/Base/JWTAlgorithmFactory.m +0 -51
  68. package/ios/CodePush/JWT/Core/Algorithms/Base/JWTAlgorithmNone.h +0 -15
  69. package/ios/CodePush/JWT/Core/Algorithms/Base/JWTAlgorithmNone.m +0 -55
  70. package/ios/CodePush/JWT/Core/Algorithms/ESFamily/JWTAlgorithmESBase.h +0 -24
  71. package/ios/CodePush/JWT/Core/Algorithms/ESFamily/JWTAlgorithmESBase.m +0 -41
  72. package/ios/CodePush/JWT/Core/Algorithms/HSFamily/JWTAlgorithmHSBase.h +0 -28
  73. package/ios/CodePush/JWT/Core/Algorithms/HSFamily/JWTAlgorithmHSBase.m +0 -205
  74. package/ios/CodePush/JWT/Core/Algorithms/Holders/JWTAlgorithmDataHolder.h +0 -103
  75. package/ios/CodePush/JWT/Core/Algorithms/Holders/JWTAlgorithmDataHolder.m +0 -322
  76. package/ios/CodePush/JWT/Core/Algorithms/Holders/JWTAlgorithmDataHolderChain.h +0 -37
  77. package/ios/CodePush/JWT/Core/Algorithms/Holders/JWTAlgorithmDataHolderChain.m +0 -145
  78. package/ios/CodePush/JWT/Core/Algorithms/RSFamily/JWTAlgorithmRSBase.h +0 -35
  79. package/ios/CodePush/JWT/Core/Algorithms/RSFamily/JWTAlgorithmRSBase.m +0 -551
  80. package/ios/CodePush/JWT/Core/Algorithms/RSFamily/JWTRSAlgorithm.h +0 -23
  81. package/ios/CodePush/JWT/Core/Algorithms/RSFamily/RSKeys/JWTCryptoKey.h +0 -43
  82. package/ios/CodePush/JWT/Core/Algorithms/RSFamily/RSKeys/JWTCryptoKey.m +0 -230
  83. package/ios/CodePush/JWT/Core/Algorithms/RSFamily/RSKeys/JWTCryptoKeyExtractor.h +0 -31
  84. package/ios/CodePush/JWT/Core/Algorithms/RSFamily/RSKeys/JWTCryptoKeyExtractor.m +0 -113
  85. package/ios/CodePush/JWT/Core/Algorithms/RSFamily/RSKeys/JWTCryptoSecurity.h +0 -38
  86. package/ios/CodePush/JWT/Core/Algorithms/RSFamily/RSKeys/JWTCryptoSecurity.m +0 -500
  87. package/ios/CodePush/JWT/Core/ClaimSet/JWTClaim.h +0 -18
  88. package/ios/CodePush/JWT/Core/ClaimSet/JWTClaim.m +0 -214
  89. package/ios/CodePush/JWT/Core/ClaimSet/JWTClaimsSet.h +0 -23
  90. package/ios/CodePush/JWT/Core/ClaimSet/JWTClaimsSet.m +0 -29
  91. package/ios/CodePush/JWT/Core/ClaimSet/JWTClaimsSetSerializer.h +0 -19
  92. package/ios/CodePush/JWT/Core/ClaimSet/JWTClaimsSetSerializer.m +0 -68
  93. package/ios/CodePush/JWT/Core/ClaimSet/JWTClaimsSetVerifier.h +0 -18
  94. package/ios/CodePush/JWT/Core/ClaimSet/JWTClaimsSetVerifier.m +0 -72
  95. package/ios/CodePush/JWT/Core/Coding/JWTCoding+ResultTypes.h +0 -67
  96. package/ios/CodePush/JWT/Core/Coding/JWTCoding+ResultTypes.m +0 -111
  97. package/ios/CodePush/JWT/Core/Coding/JWTCoding+VersionOne.h +0 -119
  98. package/ios/CodePush/JWT/Core/Coding/JWTCoding+VersionOne.m +0 -307
  99. package/ios/CodePush/JWT/Core/Coding/JWTCoding+VersionThree.h +0 -94
  100. package/ios/CodePush/JWT/Core/Coding/JWTCoding+VersionThree.m +0 -619
  101. package/ios/CodePush/JWT/Core/Coding/JWTCoding+VersionTwo.h +0 -164
  102. package/ios/CodePush/JWT/Core/Coding/JWTCoding+VersionTwo.m +0 -514
  103. package/ios/CodePush/JWT/Core/Coding/JWTCoding.h +0 -24
  104. package/ios/CodePush/JWT/Core/Coding/JWTCoding.m +0 -11
  105. package/ios/CodePush/JWT/Core/FrameworkSupplement/JWT.h +0 -52
  106. package/ios/CodePush/JWT/Core/FrameworkSupplement/Map.modulemap +0 -5
  107. package/ios/CodePush/JWT/Core/Supplement/JWTBase64Coder.h +0 -28
  108. package/ios/CodePush/JWT/Core/Supplement/JWTBase64Coder.m +0 -70
  109. package/ios/CodePush/JWT/Core/Supplement/JWTDeprecations.h +0 -22
  110. package/ios/CodePush/JWT/Core/Supplement/JWTErrorDescription.h +0 -34
  111. package/ios/CodePush/JWT/Core/Supplement/JWTErrorDescription.m +0 -73
  112. package/ios/CodePush/JWT/LICENSE +0 -19
  113. package/ios/CodePush/JWT/README.md +0 -489
  114. package/ios/CodePush/SSZipArchive/Info.plist +0 -26
  115. package/ios/CodePush/SSZipArchive/README.md +0 -1
  116. package/ios/CodePush/SSZipArchive/SSZipArchive.h +0 -178
  117. package/ios/CodePush/SSZipArchive/SSZipArchive.m +0 -1496
  118. package/ios/CodePush/SSZipArchive/SSZipCommon.h +0 -71
  119. package/ios/CodePush/SSZipArchive/Supporting Files/PrivacyInfo.xcprivacy +0 -23
  120. package/ios/CodePush/SSZipArchive/include/ZipArchive.h +0 -25
  121. package/ios/CodePush/SSZipArchive/minizip/LICENSE +0 -17
  122. package/ios/CodePush/SSZipArchive/minizip/mz.h +0 -273
  123. package/ios/CodePush/SSZipArchive/minizip/mz_compat.c +0 -1306
  124. package/ios/CodePush/SSZipArchive/minizip/mz_compat.h +0 -346
  125. package/ios/CodePush/SSZipArchive/minizip/mz_crypt.c +0 -187
  126. package/ios/CodePush/SSZipArchive/minizip/mz_crypt.h +0 -65
  127. package/ios/CodePush/SSZipArchive/minizip/mz_crypt_apple.c +0 -526
  128. package/ios/CodePush/SSZipArchive/minizip/mz_os.c +0 -348
  129. package/ios/CodePush/SSZipArchive/minizip/mz_os.h +0 -176
  130. package/ios/CodePush/SSZipArchive/minizip/mz_os_posix.c +0 -350
  131. package/ios/CodePush/SSZipArchive/minizip/mz_strm.c +0 -556
  132. package/ios/CodePush/SSZipArchive/minizip/mz_strm.h +0 -132
  133. package/ios/CodePush/SSZipArchive/minizip/mz_strm_buf.c +0 -383
  134. package/ios/CodePush/SSZipArchive/minizip/mz_strm_buf.h +0 -42
  135. package/ios/CodePush/SSZipArchive/minizip/mz_strm_mem.c +0 -269
  136. package/ios/CodePush/SSZipArchive/minizip/mz_strm_mem.h +0 -48
  137. package/ios/CodePush/SSZipArchive/minizip/mz_strm_os.h +0 -40
  138. package/ios/CodePush/SSZipArchive/minizip/mz_strm_os_posix.c +0 -203
  139. package/ios/CodePush/SSZipArchive/minizip/mz_strm_pkcrypt.c +0 -334
  140. package/ios/CodePush/SSZipArchive/minizip/mz_strm_pkcrypt.h +0 -46
  141. package/ios/CodePush/SSZipArchive/minizip/mz_strm_split.c +0 -429
  142. package/ios/CodePush/SSZipArchive/minizip/mz_strm_split.h +0 -43
  143. package/ios/CodePush/SSZipArchive/minizip/mz_strm_wzaes.c +0 -360
  144. package/ios/CodePush/SSZipArchive/minizip/mz_strm_wzaes.h +0 -46
  145. package/ios/CodePush/SSZipArchive/minizip/mz_strm_zlib.c +0 -389
  146. package/ios/CodePush/SSZipArchive/minizip/mz_strm_zlib.h +0 -43
  147. package/ios/CodePush/SSZipArchive/minizip/mz_zip.c +0 -2782
  148. package/ios/CodePush/SSZipArchive/minizip/mz_zip.h +0 -262
  149. package/ios/CodePush/SSZipArchive/minizip/mz_zip_rw.c +0 -1942
  150. package/ios/CodePush/SSZipArchive/minizip/mz_zip_rw.h +0 -285
  151. package/scripts/postlink/android/postlink.js +0 -87
  152. package/scripts/postlink/ios/postlink.js +0 -116
  153. package/scripts/postlink/run.js +0 -11
  154. package/scripts/postunlink/android/postunlink.js +0 -74
  155. package/scripts/postunlink/ios/postunlink.js +0 -87
  156. package/scripts/postunlink/run.js +0 -11
  157. package/scripts/tools/linkToolsAndroid.js +0 -57
  158. package/scripts/tools/linkToolsIos.js +0 -130
  159. package/windows-legacy/CodePush/CodePush.csproj +0 -128
  160. package/windows-legacy/CodePush/CodePushUtils.cs +0 -47
  161. package/windows-legacy/CodePush/FileUtils.cs +0 -40
  162. package/windows-legacy/CodePush/Properties/AssemblyInfo.cs +0 -29
  163. package/windows-legacy/CodePush/Properties/CodePush.rd.xml +0 -33
  164. package/windows-legacy/CodePush/UpdateManager.cs +0 -305
  165. package/windows-legacy/CodePush/UpdateUtils.cs +0 -46
  166. package/windows-legacy/CodePush.Net46/Adapters/Http/HttpProgress.cs +0 -28
  167. package/windows-legacy/CodePush.Net46/Adapters/Storage/ApplicationDataContainer.cs +0 -106
  168. package/windows-legacy/CodePush.Net46/CodePush.Net46.csproj +0 -103
  169. package/windows-legacy/CodePush.Net46/CodePushUtils.cs +0 -158
  170. package/windows-legacy/CodePush.Net46/FileUtils.cs +0 -55
  171. package/windows-legacy/CodePush.Net46/Properties/AssemblyInfo.cs +0 -36
  172. package/windows-legacy/CodePush.Net46/UpdateManager.cs +0 -330
  173. package/windows-legacy/CodePush.Net46/UpdateUtils.cs +0 -70
  174. package/windows-legacy/CodePush.Net46/packages.config +0 -5
  175. package/windows-legacy/CodePush.Net46.Test/ApplicationDataContainerTest.cs +0 -105
  176. package/windows-legacy/CodePush.Net46.Test/CodePush.Net46.Test.csproj +0 -137
  177. package/windows-legacy/CodePush.Net46.Test/Properties/AssemblyInfo.cs +0 -36
  178. package/windows-legacy/CodePush.Net46.Test/TelemetryManagerTest.cs +0 -117
  179. package/windows-legacy/CodePush.Net46.Test/app.config +0 -11
  180. package/windows-legacy/CodePush.Net46.Test/packages.config +0 -4
  181. package/windows-legacy/CodePush.Shared/CodePush.Shared.projitems +0 -22
  182. package/windows-legacy/CodePush.Shared/CodePush.Shared.shproj +0 -13
  183. package/windows-legacy/CodePush.Shared/CodePushConstants.cs +0 -35
  184. package/windows-legacy/CodePush.Shared/CodePushNativeModule.cs +0 -329
  185. package/windows-legacy/CodePush.Shared/CodePushReactPackage.cs +0 -235
  186. package/windows-legacy/CodePush.Shared/CodePushUtils.cs +0 -70
  187. package/windows-legacy/CodePush.Shared/InstallMode.cs +0 -9
  188. package/windows-legacy/CodePush.Shared/MinimumBackgroundListener.cs +0 -44
  189. package/windows-legacy/CodePush.Shared/SettingsManager.cs +0 -148
  190. package/windows-legacy/CodePush.Shared/TelemetryManager.cs +0 -250
  191. package/windows-legacy/CodePush.Shared/UpdateState.cs +0 -9
@@ -1,105 +0,0 @@
1
- using System;
2
- using Microsoft.VisualStudio.TestTools.UnitTesting;
3
- using CodePush.Net46.Adapters.Storage;
4
- using System.Threading.Tasks;
5
-
6
- namespace CodePush.Net46.Test
7
- {
8
- [TestClass]
9
- public class ApplicationDataContainerTest
10
- {
11
- readonly static string key1 = "key1";
12
- readonly static string key2 = "key2";
13
- readonly static string key3 = "key3";
14
-
15
- readonly static string val1 = "string data1";
16
- readonly static string val2 = "string data2";
17
- readonly static string val3 = "string data1";
18
-
19
- [TestMethod]
20
- public void TestInMemmorySet()
21
- {
22
- var settings = new ApplicationDataContainer();
23
-
24
- settings.Values[key1] = val1;
25
- settings.Values[key2] = val2;
26
- settings.Values[key3] = val3;
27
-
28
- Assert.AreEqual(settings.Values[key1], val1);
29
- Assert.AreEqual(settings.Values[key2], val2);
30
- Assert.AreEqual(settings.Values[key3], val3);
31
-
32
- settings.DeleteAsync().Wait();
33
- }
34
-
35
- [TestMethod]
36
- public void TestInMemmoryReset()
37
- {
38
- var settings = new ApplicationDataContainer();
39
-
40
- settings.Values[key1] = val1;
41
- settings.Values[key1] = val2;
42
- settings.Values[key1] = val3;
43
-
44
- Assert.AreEqual(settings.Values[key1], val3);
45
-
46
- settings.DeleteAsync().Wait();
47
- }
48
-
49
- [TestMethod]
50
- public void TestInMemmoryRemove()
51
- {
52
- var settings = new ApplicationDataContainer();
53
-
54
- settings.Values[key1] = val1;
55
- settings.Values[key2] = val2;
56
- settings.Values[key3] = val3;
57
-
58
- settings.Values.Remove(key2);
59
-
60
- Assert.AreEqual(settings.Values[key1], val1);
61
- Assert.IsNull(settings.Values[key2]);
62
- Assert.AreEqual(settings.Values[key3], val3);
63
-
64
- settings.DeleteAsync().Wait();
65
- }
66
-
67
- [TestMethod]
68
- public void TestPersistentSet()
69
- {
70
- var settings = new ApplicationDataContainer();
71
-
72
- settings.Values[key1] = val1;
73
- settings.Values[key2] = val2;
74
- settings.Values[key3] = val3;
75
-
76
- settings = new ApplicationDataContainer();
77
-
78
- Assert.AreEqual(settings.Values[key1], val1);
79
- Assert.AreEqual(settings.Values[key2], val2);
80
- Assert.AreEqual(settings.Values[key3], val3);
81
-
82
- settings.DeleteAsync().Wait();
83
- }
84
-
85
- [TestMethod]
86
- public void TestPersistentRemove()
87
- {
88
- var settings = new ApplicationDataContainer();
89
-
90
- settings.Values[key1] = val1;
91
- settings.Values[key2] = val2;
92
- settings.Values[key3] = val3;
93
-
94
- settings.Values.Remove(key2);
95
-
96
- settings = new ApplicationDataContainer();
97
-
98
- Assert.AreEqual(settings.Values[key1], val1);
99
- Assert.IsNull(settings.Values[key2]);
100
- Assert.AreEqual(settings.Values[key3], val3);
101
-
102
- settings.DeleteAsync().Wait();
103
- }
104
- }
105
- }
@@ -1,137 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3
- <PropertyGroup>
4
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
5
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
6
- <ProjectGuid>{BBB48F0B-AF6F-4A14-AFA4-306D3FB0B7CF}</ProjectGuid>
7
- <OutputType>Library</OutputType>
8
- <AppDesignerFolder>Properties</AppDesignerFolder>
9
- <RootNamespace>CodePush.Net46.Test</RootNamespace>
10
- <AssemblyName>CodePush.Net46.Test</AssemblyName>
11
- <TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
12
- <FileAlignment>512</FileAlignment>
13
- <ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
14
- <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
15
- <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
16
- <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages</ReferencePath>
17
- <IsCodedUITest>False</IsCodedUITest>
18
- <TestProjectType>UnitTest</TestProjectType>
19
- </PropertyGroup>
20
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
21
- <DebugSymbols>true</DebugSymbols>
22
- <DebugType>full</DebugType>
23
- <Optimize>false</Optimize>
24
- <OutputPath>bin\Debug\</OutputPath>
25
- <DefineConstants>DEBUG;TRACE</DefineConstants>
26
- <ErrorReport>prompt</ErrorReport>
27
- <WarningLevel>4</WarningLevel>
28
- </PropertyGroup>
29
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
30
- <DebugType>pdbonly</DebugType>
31
- <Optimize>true</Optimize>
32
- <OutputPath>bin\Release\</OutputPath>
33
- <DefineConstants>TRACE</DefineConstants>
34
- <ErrorReport>prompt</ErrorReport>
35
- <WarningLevel>4</WarningLevel>
36
- </PropertyGroup>
37
- <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
38
- <DebugSymbols>true</DebugSymbols>
39
- <OutputPath>bin\x64\Debug\</OutputPath>
40
- <DefineConstants>DEBUG;TRACE</DefineConstants>
41
- <DebugType>full</DebugType>
42
- <PlatformTarget>x64</PlatformTarget>
43
- <ErrorReport>prompt</ErrorReport>
44
- <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
45
- </PropertyGroup>
46
- <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
47
- <OutputPath>bin\x64\Release\</OutputPath>
48
- <DefineConstants>TRACE</DefineConstants>
49
- <Optimize>true</Optimize>
50
- <DebugType>pdbonly</DebugType>
51
- <PlatformTarget>x64</PlatformTarget>
52
- <ErrorReport>prompt</ErrorReport>
53
- <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
54
- </PropertyGroup>
55
- <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
56
- <DebugSymbols>true</DebugSymbols>
57
- <OutputPath>bin\x86\Debug\</OutputPath>
58
- <DefineConstants>DEBUG;TRACE</DefineConstants>
59
- <DebugType>full</DebugType>
60
- <PlatformTarget>x86</PlatformTarget>
61
- <ErrorReport>prompt</ErrorReport>
62
- <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
63
- </PropertyGroup>
64
- <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
65
- <OutputPath>bin\x86\Release\</OutputPath>
66
- <DefineConstants>TRACE</DefineConstants>
67
- <Optimize>true</Optimize>
68
- <DebugType>pdbonly</DebugType>
69
- <PlatformTarget>x86</PlatformTarget>
70
- <ErrorReport>prompt</ErrorReport>
71
- <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
72
- </PropertyGroup>
73
- <ItemGroup>
74
- <Reference Include="Newtonsoft.Json, Version=13.0.1.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
75
- <SpecificVersion>False</SpecificVersion>
76
- <HintPath>..\..\Examples\CodePushDemoApp\windows\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
77
- <Private>True</Private>
78
- </Reference>
79
- <Reference Include="System" />
80
- </ItemGroup>
81
- <Choose>
82
- <When Condition="('$(VisualStudioVersion)' == '10.0' or '$(VisualStudioVersion)' == '') and '$(TargetFrameworkVersion)' == 'v3.5'">
83
- <ItemGroup>
84
- <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
85
- </ItemGroup>
86
- </When>
87
- <Otherwise>
88
- <ItemGroup>
89
- <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework">
90
- <Private>False</Private>
91
- </Reference>
92
- </ItemGroup>
93
- </Otherwise>
94
- </Choose>
95
- <ItemGroup>
96
- <Compile Include="ApplicationDataContainerTest.cs" />
97
- <Compile Include="Properties\AssemblyInfo.cs" />
98
- <Compile Include="TelemetryManagerTest.cs" />
99
- </ItemGroup>
100
- <ItemGroup>
101
- <ProjectReference Include="..\CodePush.Net46\CodePush.Net46.csproj">
102
- <Project>{4dfe3f9f-5e15-4f17-8fd4-33ff0519348e}</Project>
103
- <Name>CodePush.Net46</Name>
104
- </ProjectReference>
105
- </ItemGroup>
106
- <ItemGroup>
107
- <None Include="app.config" />
108
- <None Include="packages.config" />
109
- </ItemGroup>
110
- <Choose>
111
- <When Condition="'$(VisualStudioVersion)' == '10.0' And '$(IsCodedUITest)' == 'True'">
112
- <ItemGroup>
113
- <Reference Include="Microsoft.VisualStudio.QualityTools.CodedUITestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
114
- <Private>False</Private>
115
- </Reference>
116
- <Reference Include="Microsoft.VisualStudio.TestTools.UITest.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
117
- <Private>False</Private>
118
- </Reference>
119
- <Reference Include="Microsoft.VisualStudio.TestTools.UITest.Extension, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
120
- <Private>False</Private>
121
- </Reference>
122
- <Reference Include="Microsoft.VisualStudio.TestTools.UITesting, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
123
- <Private>False</Private>
124
- </Reference>
125
- </ItemGroup>
126
- </When>
127
- </Choose>
128
- <Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" />
129
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
130
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
131
- Other similar extension points exist, see Microsoft.Common.targets.
132
- <Target Name="BeforeBuild">
133
- </Target>
134
- <Target Name="AfterBuild">
135
- </Target>
136
- -->
137
- </Project>
@@ -1,36 +0,0 @@
1
- using System.Reflection;
2
- using System.Runtime.CompilerServices;
3
- using System.Runtime.InteropServices;
4
-
5
- // General Information about an assembly is controlled through the following
6
- // set of attributes. Change these attribute values to modify the information
7
- // associated with an assembly.
8
- [assembly: AssemblyTitle("CodePush.Net46.Test")]
9
- [assembly: AssemblyDescription("")]
10
- [assembly: AssemblyConfiguration("")]
11
- [assembly: AssemblyCompany("")]
12
- [assembly: AssemblyProduct("CodePush.Net46.Test")]
13
- [assembly: AssemblyCopyright("Copyright © 2017")]
14
- [assembly: AssemblyTrademark("")]
15
- [assembly: AssemblyCulture("")]
16
-
17
- // Setting ComVisible to false makes the types in this assembly not visible
18
- // to COM components. If you need to access a type in this assembly from
19
- // COM, set the ComVisible attribute to true on that type.
20
- [assembly: ComVisible(false)]
21
-
22
- // The following GUID is for the ID of the typelib if this project is exposed to COM
23
- [assembly: Guid("bbb48f0b-af6f-4a14-afa4-306d3fb0b7cf")]
24
-
25
- // Version information for an assembly consists of the following four values:
26
- //
27
- // Major Version
28
- // Minor Version
29
- // Build Number
30
- // Revision
31
- //
32
- // You can specify all the values or you can default the Build and Revision Numbers
33
- // by using the '*' as shown below:
34
- // [assembly: AssemblyVersion("1.0.*")]
35
- [assembly: AssemblyVersion("1.0.0.0")]
36
- [assembly: AssemblyFileVersion("1.0.0.0")]
@@ -1,117 +0,0 @@
1
- using CodePush.ReactNative;
2
- using Microsoft.VisualStudio.TestTools.UnitTesting;
3
- using Newtonsoft.Json;
4
- using Newtonsoft.Json.Linq;
5
-
6
- namespace CodePush.Net46.Test
7
- {
8
- /// <summary>
9
- /// Some tests for telemetry manager
10
- /// As implementation of TelemetryManager was ported from android version, we do not test logic here.
11
- /// Here are tests for some tricky parts of implementation, or check some data transformation that
12
- /// has no full equvalent in C#
13
- /// </summary>
14
- [TestClass]
15
- public class TelemetryManagerTest
16
- {
17
- #region Constants from TelemetryManager
18
- //private static readonly string APP_VERSION_KEY = "appVersion";
19
- private static readonly string DEPLOYMENT_FAILED_STATUS = "DeploymentFailed";
20
- private static readonly string DEPLOYMENT_KEY_KEY = "deploymentKey";
21
- private static readonly string DEPLOYMENT_SUCCEEDED_STATUS = "DeploymentSucceeded";
22
- private static readonly string LABEL_KEY = "label";
23
- private static readonly string LAST_DEPLOYMENT_REPORT_KEY = "CODE_PUSH_LAST_DEPLOYMENT_REPORT";
24
- //private static readonly string PACKAGE_KEY = "package";
25
- //private static readonly string PREVIOUS_DEPLOYMENT_KEY_KEY = "previousDeploymentKey";
26
- //private static readonly string PREVIOUS_LABEL_OR_APP_VERSION_KEY = "previousLabelOrAppVersion";
27
- private static readonly string RETRY_DEPLOYMENT_REPORT_KEY = "CODE_PUSH_RETRY_DEPLOYMENT_REPORT";
28
- private static readonly string STATUS_KEY = "status";
29
- #endregion
30
-
31
- [TestMethod]
32
- public void TestGetUpdateReportNoPreviousUpdate()
33
- {
34
- var input = new JObject();
35
- input.Add(DEPLOYMENT_KEY_KEY, "depKeyParam");
36
- input.Add(LABEL_KEY, "labelParam");
37
-
38
- var output = TelemetryManager.GetUpdateReport(input);
39
- Assert.IsNotNull(output);
40
- Assert.IsTrue(output.ToString(Formatting.None).Contains("\"status\":\"DeploymentSucceeded\""));
41
- }
42
-
43
- [TestMethod]
44
- public void TestGetUpdateReportWithPreviousUpdate()
45
- {
46
- SettingsManager.SetString(LAST_DEPLOYMENT_REPORT_KEY, "prevKey:prevLabel");
47
- var input = new JObject();
48
- input.Add(DEPLOYMENT_KEY_KEY, "depKeyParam");
49
- input.Add(LABEL_KEY, "labelParam");
50
-
51
- var output = TelemetryManager.GetUpdateReport(input);
52
- Assert.IsNotNull(output);
53
- Assert.IsTrue(output.ToString(Formatting.None).Contains("\"status\":\"DeploymentSucceeded\""));
54
- Assert.IsTrue(output.ToString(Formatting.None).Contains("\"previousDeploymentKey\":\"prevKey\",\"previousLabelOrAppVersion\":\"prevLabel\""));
55
-
56
- //Clean Up
57
- SettingsManager.RemoveString(LAST_DEPLOYMENT_REPORT_KEY);
58
- }
59
-
60
- [TestMethod]
61
- public void TestGetUpdateReportNegative()
62
- {
63
- var inputNoLabel = new JObject();
64
- inputNoLabel.Add(DEPLOYMENT_KEY_KEY, "depKeyParam");
65
- Assert.IsNull(TelemetryManager.GetUpdateReport(inputNoLabel));
66
-
67
- var inputNoKey = new JObject();
68
- inputNoKey.Add(LABEL_KEY, "labelParam");
69
- Assert.IsNull(TelemetryManager.GetUpdateReport(inputNoKey));
70
- }
71
-
72
- [TestMethod]
73
- public void TestRecordStatusReportWithRollback()
74
- {
75
- var report = new JObject();
76
- report.Add(STATUS_KEY, DEPLOYMENT_FAILED_STATUS);
77
-
78
- TelemetryManager.RecordStatusReported(report);
79
- Assert.IsTrue(true);
80
- }
81
-
82
- [TestMethod]
83
- public void TestRecordStatusReportWithoutRollback()
84
- {
85
- var reportSuccess = new JObject();
86
- reportSuccess.Add(STATUS_KEY, DEPLOYMENT_SUCCEEDED_STATUS);
87
- TelemetryManager.RecordStatusReported(reportSuccess);
88
-
89
- var reportNoStatus = new JObject();
90
- TelemetryManager.RecordStatusReported(reportNoStatus);
91
-
92
- Assert.IsTrue(true);
93
- }
94
-
95
- [TestMethod]
96
- public void TestStatusReportForRetrySerialization()
97
- {
98
- SettingsManager.RemoveString(RETRY_DEPLOYMENT_REPORT_KEY);
99
- var original = new JObject();
100
- original.Add("keyString", "stringValue");
101
- original.Add("keyInt", 42);
102
- original.Add("keyBool", true);
103
-
104
- TelemetryManager.SaveStatusReportForRetry(original);
105
-
106
- var stringified = SettingsManager.GetString(RETRY_DEPLOYMENT_REPORT_KEY);
107
- SettingsManager.RemoveString(RETRY_DEPLOYMENT_REPORT_KEY);
108
-
109
- Assert.IsNotNull(stringified);
110
- var result = JObject.Parse(stringified);
111
-
112
- Assert.IsTrue((bool)result.GetValue("keyBool"));
113
- Assert.AreEqual(42, (int)result.GetValue("keyInt"));
114
- Assert.AreEqual("stringValue", (string)result.GetValue("keyString"));
115
- }
116
- }
117
- }
@@ -1,11 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <configuration>
3
- <runtime>
4
- <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
5
- <dependentAssembly>
6
- <assemblyIdentity name="System.Reactive.Core" publicKeyToken="94bc3704cddfc263" culture="neutral" />
7
- <bindingRedirect oldVersion="0.0.0.0-3.0.3000.0" newVersion="3.0.3000.0" />
8
- </dependentAssembly>
9
- </assemblyBinding>
10
- </runtime>
11
- </configuration>
@@ -1,4 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <packages>
3
- <package id="Newtonsoft.Json" version="13.0.1" targetFramework="net46" />
4
- </packages>
@@ -1,22 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3
- <PropertyGroup>
4
- <MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
5
- <HasSharedItems>true</HasSharedItems>
6
- <SharedGUID>4ad4c826-cc26-4f1d-b60d-b97b22f52e90</SharedGUID>
7
- </PropertyGroup>
8
- <PropertyGroup Label="Configuration">
9
- <Import_RootNamespace>CodePush.Shared</Import_RootNamespace>
10
- </PropertyGroup>
11
- <ItemGroup>
12
- <Compile Include="$(MSBuildThisFileDirectory)CodePushConstants.cs" />
13
- <Compile Include="$(MSBuildThisFileDirectory)CodePushNativeModule.cs" />
14
- <Compile Include="$(MSBuildThisFileDirectory)CodePushReactPackage.cs" />
15
- <Compile Include="$(MSBuildThisFileDirectory)CodePushUtils.cs" />
16
- <Compile Include="$(MSBuildThisFileDirectory)InstallMode.cs" />
17
- <Compile Include="$(MSBuildThisFileDirectory)MinimumBackgroundListener.cs" />
18
- <Compile Include="$(MSBuildThisFileDirectory)SettingsManager.cs" />
19
- <Compile Include="$(MSBuildThisFileDirectory)TelemetryManager.cs" />
20
- <Compile Include="$(MSBuildThisFileDirectory)UpdateState.cs" />
21
- </ItemGroup>
22
- </Project>
@@ -1,13 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3
- <PropertyGroup Label="Globals">
4
- <ProjectGuid>4ad4c826-cc26-4f1d-b60d-b97b22f52e90</ProjectGuid>
5
- <MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
6
- </PropertyGroup>
7
- <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
8
- <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.Default.props" />
9
- <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.props" />
10
- <PropertyGroup />
11
- <Import Project="CodePush.Shared.projitems" Label="Shared" />
12
- <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.CSharp.targets" />
13
- </Project>
@@ -1,35 +0,0 @@
1
- namespace CodePush.ReactNative
2
- {
3
- internal class CodePushConstants
4
- {
5
- internal const string BinaryModifiedTimeKey = "binaryModifiedTime";
6
- internal const string CodePushServerUrl = "https://codepush.appzung.com/";
7
- internal const string CodePushFolderPrefix = "CodePush";
8
- internal const string CodePushPreferences = "CodePush";
9
- internal const string CurrentPackageKey = "currentPackage";
10
- internal const string DefaultJsBundleName = "index.windows.bundle";
11
- internal const string DiffManifestFileName = "hotcodepush.json";
12
- internal const string DownloadFileName = "download.zip";
13
- internal const string DownloadProgressEventName = "CodePushDownloadProgress";
14
- internal const string DownloadUrlKey = "downloadUrl";
15
- internal const string FailedUpdatesKey = "CODE_PUSH_FAILED_UPDATES";
16
- internal const string PackageFileName = "app.json";
17
- internal const string PackageHashKey = "packageHash";
18
- internal const string PendingUpdateHashKey = "hash";
19
- internal const string PendingUpdateKey = "CODE_PUSH_PENDING_UPDATE";
20
- internal const string PendingUpdateIsLoadingKey = "isLoading";
21
- internal const string PreviousPackageKey = "previousPackage";
22
- // This needs to be kept in sync with https://github.com/ReactWindows/react-native-windows/blob/master/ReactWindows/ReactNative/DevSupport/DevSupportManager.cs#L22
23
- internal const string ReactDevBundleCacheFileName = "ReactNativeDevBundle.js";
24
- internal const string ReactNativeLogCategory = "ReactNative";
25
- internal const string RelativeBundlePathKey = "bundlePath";
26
- internal const string StatusFileName = "codepush.json";
27
- internal const string UnzippedFolderName = "unzipped";
28
- #if WINDOWS_UWP
29
- internal const string AssetsBundlePrefix = "ms-appx:///ReactAssets/";
30
- internal const string FileBundlePrefix = "ms-appdata:///local/";
31
- #else
32
- internal const string AssetsBundlePrefix = "ReactAssets/";
33
- #endif
34
- }
35
- }