@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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@srcpush/react-native-code-push",
3
- "version": "1.0.3-develop.1",
3
+ "version": "1.0.3-develop.3",
4
4
  "description": "React Native plugin for the CodePush service",
5
5
  "main": "CodePush.js",
6
6
  "typings": "typings/react-native-code-push.d.ts",
@@ -1,104 +0,0 @@
1
- trigger:
2
- - master
3
-
4
- pr:
5
- - master
6
-
7
- resources:
8
- repositories:
9
- - repository: 1ESPipelineTemplates
10
- type: git
11
- name: 1ESPipelineTemplates/1ESPipelineTemplates
12
- ref: refs/tags/release
13
- name: $(Build.SourceBranchName)_$(date:yyyyMMdd)$(rev:.r)
14
-
15
- extends:
16
- ${{ if eq(variables['Build.SourceBranch'], 'refs/heads/master') }}:
17
- template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates
18
- ${{ else }}:
19
- template: v1/1ES.Unofficial.PipelineTemplate.yml@1ESPipelineTemplates
20
- parameters:
21
- pool:
22
- name: 1ES-PT-CBL-Mariner-2.0-Gen2
23
- os: linux
24
- customBuildTags:
25
- - ES365AIMigrationTooling-BulkMigrated
26
- sdl:
27
- sourceAnalysisPool: 1ES-PT-Windows-2022
28
- credscan:
29
- suppressionsFile: $(Build.SourcesDirectory)/.config/CredScanSuppressions.json
30
- stages:
31
- - stage: Stage
32
- jobs:
33
- - job: HostJob
34
- templateContext:
35
- outputs:
36
- - output: pipelineArtifact
37
- displayName: "Publish Artifact: artifacts"
38
- path: '$(Build.ArtifactStagingDirectory)/npm'
39
- artifactName: npm
40
-
41
- steps:
42
- - task: NodeTool@0
43
- inputs:
44
- versionSpec: '14.x'
45
- displayName: 'Install Node.js'
46
-
47
- - script: |
48
- npm pack
49
- npm install -g react-native-code-push*.tgz
50
- displayName: 'Package react-native-code-push'
51
- workingDirectory: $(Build.SourcesDirectory)
52
-
53
- - task: DeleteFiles@1
54
- inputs:
55
- contents: node_modules
56
- displayName: 'Delete node_modules'
57
-
58
- - task: ArchiveFiles@2
59
- inputs:
60
- rootFolderOrFile: '$(Build.SourcesDirectory)'
61
- includeRootFolder: false
62
- archiveType: 'tar'
63
- archiveFile: '$(Build.ArtifactStagingDirectory)/npm/$(Build.BuildId).tgz'
64
- replaceExistingArchive: true
65
- verbose: true
66
- displayName: 'Prepare npm artifact'
67
-
68
- - stage: APIScan
69
- dependsOn: Stage
70
- pool:
71
- name: 1ES-PT-Windows-2022
72
- os: windows
73
- variables:
74
- "agent.source.skip": true
75
- jobs:
76
- - job: APIScan
77
- steps:
78
- - task: DownloadPipelineArtifact@2
79
- displayName: Download Build Artifacts for APIScan
80
- inputs:
81
- artifactName: npm
82
- targetPath: '$(Agent.BuildDirectory)/npm'
83
- - task: ExtractFiles@1
84
- inputs:
85
- archiveFilePatterns: '$(Agent.BuildDirectory)/npm/*.tgz'
86
- destinationFolder: '$(Agent.BuildDirectory)/npm_extracted'
87
- - task: AzureKeyVault@2
88
- inputs:
89
- azureSubscription: 'AC - Dev Infra & Build Pool'
90
- KeyVaultName: 'mobile-center-sdk'
91
- SecretsFilter: 'appcenter-sdk-managed-identity-clientid'
92
- RunAsPreJob: false
93
- - task: APIScan@2
94
- displayName: 'Run APIScan'
95
- inputs:
96
- softwareFolder: '$(Agent.BuildDirectory)\npm_extracted'
97
- softwareName: 'react-native-code-push'
98
- softwareVersionNum: '$(Build.BuildId)'
99
- isLargeApp: false
100
- toolVersion: 'Latest'
101
- verbosityLevel: verbose
102
- condition: and(succeeded(), ne(variables['DisableAPIScan'], 'true'))
103
- env:
104
- AzureServicesAuthConnectionString: 'runAs=App;AppId=$(appcenter-sdk-managed-identity-clientid)'
@@ -1,94 +0,0 @@
1
- trigger:
2
- - master
3
-
4
- pr:
5
- - master
6
-
7
- variables:
8
- - name: api-level
9
- value: '27'
10
-
11
- pool:
12
- vmImage: 'macOS-12'
13
-
14
- stages:
15
- - stage: RunTests
16
- displayName: 'Run Android & IOS tests'
17
- jobs:
18
- - job: TestAndroid
19
- timeoutInMinutes: 120
20
- displayName: 'Test android'
21
- steps:
22
-
23
- - script: |
24
- adb devices
25
- displayName: 'Start adb server'
26
-
27
- - script: |
28
- $ANDROID_HOME/tools/bin/sdkmanager "system-images;android-$(api-level);google_apis;x86"
29
- displayName: 'Download system image'
30
-
31
- - script: |
32
- $ANDROID_HOME/tools/bin/avdmanager create avd --force --name TestEmulator --abi google_apis/x86 --package 'system-images;android-$(api-level);google_apis;x86' --device "Nexus 6P"
33
- displayName: 'Creating Android emulator'
34
-
35
- - script: |
36
- $ANDROID_HOME/emulator/emulator -avd TestEmulator -noaudio -no-window -no-snapshot-save -no-boot-anim -memory 6144 &
37
- displayName: 'Start Android emulator'
38
-
39
- - script: |
40
- $ANDROID_HOME/platform-tools/adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed | tr -d '\r') ]]; do sleep 1; done'
41
- displayName: 'Wait for emulator to boot'
42
-
43
- - script: |
44
- adb shell settings put global window_animation_scale 0.0
45
- displayName: 'Disable animations and transitions'
46
-
47
- - script: |
48
- adb shell settings put global transition_animation_scale 0.0
49
- displayName: 'Disable animations and transitions'
50
-
51
- - script: |
52
- adb shell settings put global animator_duration_scale 0.0
53
- displayName: 'Disable animations and transitions'
54
-
55
-
56
- - task: JavaToolInstaller@0
57
- inputs:
58
- versionSpec: '11'
59
- jdkArchitectureOption: 'x64'
60
- jdkSourceOption: 'PreInstalled'
61
- displayName: 'Change Java version'
62
-
63
- - script: |
64
- npm install
65
- displayName: 'Package Installation'
66
-
67
- - script: |
68
- npm run build:tests && npm run test:setup:android
69
- displayName: 'Setup Android tests'
70
-
71
- - script: |
72
- npm run test:fast:android
73
- displayName: 'Run Android test'
74
-
75
- - job: TestIOS
76
- timeoutInMinutes: 120
77
- displayName: 'Test IOS'
78
- steps:
79
-
80
- - script: |
81
- npm install
82
- displayName: 'Install dependencies'
83
-
84
- - script: |
85
- npm run build:tests && npm run test:setup:ios
86
- displayName: 'Setup iOS tests'
87
-
88
- - script: |
89
- npm run test:fast:ios
90
- displayName: 'Run tests'
91
-
92
-
93
-
94
-
@@ -1,3 +0,0 @@
1
- EXPORTS
2
- DllCanUnloadNow = WINRT_CanUnloadNow PRIVATE
3
- DllGetActivationFactory = WINRT_GetActivationFactory PRIVATE
@@ -1,198 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3
- <Import Project="$(SolutionDir)\packages\Microsoft.Windows.CppWinRT.2.0.200615.7\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('$(SolutionDir)\packages\Microsoft.Windows.CppWinRT.2.0.200615.7\build\native\Microsoft.Windows.CppWinRT.props')" />
4
- <PropertyGroup Label="Globals">
5
- <CppWinRTOptimized>true</CppWinRTOptimized>
6
- <CppWinRTRootNamespaceAutoMerge>true</CppWinRTRootNamespaceAutoMerge>
7
- <CppWinRTGenerateWindowsMetadata>true</CppWinRTGenerateWindowsMetadata>
8
- <MinimalCoreWin>true</MinimalCoreWin>
9
- <ProjectGuid>{a6b6216e-fa3f-45e2-9c8e-40023cce9132}</ProjectGuid>
10
- <ProjectName>CodePush</ProjectName>
11
- <RootNamespace>Microsoft.CodePush.ReactNative</RootNamespace>
12
- <DefaultLanguage>en-US</DefaultLanguage>
13
- <MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
14
- <AppContainerApplication>true</AppContainerApplication>
15
- <ApplicationType>Windows Store</ApplicationType>
16
- <ApplicationTypeRevision>10.0</ApplicationTypeRevision>
17
- <WindowsTargetPlatformVersion Condition=" '$(WindowsTargetPlatformVersion)' == '' ">10.0</WindowsTargetPlatformVersion>
18
- <WindowsTargetPlatformMinVersion>10.0.17763.0</WindowsTargetPlatformMinVersion>
19
- </PropertyGroup>
20
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
21
- <PropertyGroup Label="ReactNativeWindowsProps">
22
- <ReactNativeWindowsDir Condition="'$(ReactNativeWindowsDir)' == ''">$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), 'node_modules\react-native-windows\package.json'))\node_modules\react-native-windows\</ReactNativeWindowsDir>
23
- </PropertyGroup>
24
- <ItemGroup Label="ProjectConfigurations">
25
- <ProjectConfiguration Include="Debug|ARM">
26
- <Configuration>Debug</Configuration>
27
- <Platform>ARM</Platform>
28
- </ProjectConfiguration>
29
- <ProjectConfiguration Include="Debug|ARM64">
30
- <Configuration>Debug</Configuration>
31
- <Platform>ARM64</Platform>
32
- </ProjectConfiguration>
33
- <ProjectConfiguration Include="Debug|Win32">
34
- <Configuration>Debug</Configuration>
35
- <Platform>Win32</Platform>
36
- </ProjectConfiguration>
37
- <ProjectConfiguration Include="Debug|x64">
38
- <Configuration>Debug</Configuration>
39
- <Platform>x64</Platform>
40
- </ProjectConfiguration>
41
- <ProjectConfiguration Include="Release|ARM">
42
- <Configuration>Release</Configuration>
43
- <Platform>ARM</Platform>
44
- </ProjectConfiguration>
45
- <ProjectConfiguration Include="Release|ARM64">
46
- <Configuration>Release</Configuration>
47
- <Platform>ARM64</Platform>
48
- </ProjectConfiguration>
49
- <ProjectConfiguration Include="Release|Win32">
50
- <Configuration>Release</Configuration>
51
- <Platform>Win32</Platform>
52
- </ProjectConfiguration>
53
- <ProjectConfiguration Include="Release|x64">
54
- <Configuration>Release</Configuration>
55
- <Platform>x64</Platform>
56
- </ProjectConfiguration>
57
- </ItemGroup>
58
- <PropertyGroup Label="Configuration">
59
- <ConfigurationType>DynamicLibrary</ConfigurationType>
60
- <PlatformToolset Condition="'$(VisualStudioVersion)' == '15.0'">v141</PlatformToolset>
61
- <PlatformToolset Condition="'$(VisualStudioVersion)' == '16.0'">v142</PlatformToolset>
62
- <CharacterSet>Unicode</CharacterSet>
63
- <GenerateManifest>false</GenerateManifest>
64
- </PropertyGroup>
65
- <PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
66
- <UseDebugLibraries>true</UseDebugLibraries>
67
- <LinkIncremental>true</LinkIncremental>
68
- </PropertyGroup>
69
- <PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration">
70
- <UseDebugLibraries>false</UseDebugLibraries>
71
- <WholeProgramOptimization>true</WholeProgramOptimization>
72
- <LinkIncremental>false</LinkIncremental>
73
- </PropertyGroup>
74
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
75
- <ImportGroup Label="ExtensionSettings">
76
- </ImportGroup>
77
- <ImportGroup Label="Shared">
78
- </ImportGroup>
79
- <ImportGroup Label="PropertySheets">
80
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
81
- </ImportGroup>
82
- <ImportGroup Label="PropertySheets">
83
- <Import Project="PropertySheet.props" />
84
- </ImportGroup>
85
- <ImportGroup Label="ReactNativeWindowsPropertySheets">
86
- <Import Project="$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CppLib.props" Condition="Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CppLib.props')" />
87
- </ImportGroup>
88
- <PropertyGroup Label="UserMacros" />
89
- <PropertyGroup />
90
- <ItemDefinitionGroup>
91
- <ClCompile>
92
- <PrecompiledHeader>Use</PrecompiledHeader>
93
- <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
94
- <PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile>
95
- <WarningLevel>Level4</WarningLevel>
96
- <AdditionalOptions>%(AdditionalOptions) /bigobj</AdditionalOptions>
97
- <!--Temporarily disable cppwinrt heap enforcement to work around xaml compiler generated std::shared_ptr use -->
98
- <AdditionalOptions Condition="'$(CppWinRTHeapEnforcement)'==''">/DWINRT_NO_MAKE_DETECTION %(AdditionalOptions)</AdditionalOptions>
99
- <DisableSpecificWarnings>
100
- </DisableSpecificWarnings>
101
- <PreprocessorDefinitions>_WINRT_DLL;WIN32_LEAN_AND_MEAN;WINRT_LEAN_AND_MEAN;%(PreprocessorDefinitions)</PreprocessorDefinitions>
102
- <AdditionalUsingDirectories>$(WindowsSDK_WindowsMetadata);$(AdditionalUsingDirectories)</AdditionalUsingDirectories>
103
- </ClCompile>
104
- <Link>
105
- <SubSystem>Console</SubSystem>
106
- <GenerateWindowsMetadata>true</GenerateWindowsMetadata>
107
- <ModuleDefinitionFile>CodePush.def</ModuleDefinitionFile>
108
- </Link>
109
- </ItemDefinitionGroup>
110
- <ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
111
- <ClCompile>
112
- <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
113
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
114
- </ClCompile>
115
- </ItemDefinitionGroup>
116
- <ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
117
- <ClCompile>
118
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
119
- </ClCompile>
120
- <Link>
121
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
122
- <OptimizeReferences>true</OptimizeReferences>
123
- </Link>
124
- </ItemDefinitionGroup>
125
- <ItemGroup>
126
- <ClInclude Include="CodePushConfig.h" />
127
- <ClInclude Include="CodePushDownloadHandler.h" />
128
- <ClInclude Include="CodePushNativeModule.h" />
129
- <ClInclude Include="CodePushPackage.h" />
130
- <ClInclude Include="CodePushTelemetryManager.h" />
131
- <ClInclude Include="CodePushUpdateUtils.h" />
132
- <ClInclude Include="CodePushUtils.h" />
133
- <ClInclude Include="FileUtils.h" />
134
- <ClInclude Include="miniz\miniz.h" />
135
- <ClInclude Include="pch.h" />
136
- <ClInclude Include="ReactPackageProvider.h">
137
- <DependentUpon>ReactPackageProvider.idl</DependentUpon>
138
- </ClInclude>
139
- </ItemGroup>
140
- <ItemGroup>
141
- <ClCompile Include="CodePushConfig.cpp" />
142
- <ClCompile Include="CodePushDownloadHandler.cpp" />
143
- <ClCompile Include="CodePushNativeModule.cpp" />
144
- <ClCompile Include="CodePushPackage.cpp" />
145
- <ClCompile Include="CodePushTelemetryManager.cpp" />
146
- <ClCompile Include="CodePushUpdateUtils.cpp" />
147
- <ClCompile Include="CodePushUtils.cpp" />
148
- <ClCompile Include="FileUtils.cpp" />
149
- <ClCompile Include="miniz\miniz.c">
150
- <PrecompiledHeader>NotUsing</PrecompiledHeader>
151
- </ClCompile>
152
- <ClCompile Include="pch.cpp">
153
- <PrecompiledHeader>Create</PrecompiledHeader>
154
- </ClCompile>
155
- <ClCompile Include="$(GeneratedFilesDir)module.g.cpp" />
156
- <ClCompile Include="ReactPackageProvider.cpp">
157
- <DependentUpon>ReactPackageProvider.idl</DependentUpon>
158
- </ClCompile>
159
- </ItemGroup>
160
- <ItemGroup>
161
- <Midl Include="CodePushConfig.idl" />
162
- <Midl Include="ReactPackageProvider.idl" />
163
- </ItemGroup>
164
- <ItemGroup>
165
- <None Include="CodePush.def" />
166
- </ItemGroup>
167
- <ItemGroup>
168
- <None Include="packages.config" />
169
- <None Include="PropertySheet.props" />
170
- </ItemGroup>
171
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
172
- <ImportGroup Label="ReactNativeWindowsTargets">
173
- <Import Project="$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CppLib.targets" Condition="Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CppLib.targets')" />
174
- </ImportGroup>
175
- <Target Name="EnsureReactNativeWindowsTargets" BeforeTargets="PrepareForBuild">
176
- <PropertyGroup>
177
- <ErrorText>This project references targets in your node_modules\react-native-windows folder that are missing. The missing file is {0}.</ErrorText>
178
- </PropertyGroup>
179
- <Error Condition="!Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CppLib.props')" Text="$([System.String]::Format('$(ErrorText)', '$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CppLib.props'))" />
180
- <Error Condition="!Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CppLib.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CppLib.targets'))" />
181
- </Target>
182
- <ImportGroup Label="ExtensionTargets">
183
- <Import Project="$(SolutionDir)\packages\Microsoft.Windows.CppWinRT.2.0.200615.7\build\native\Microsoft.Windows.CppWinRT.targets" Condition="Exists('$(SolutionDir)\packages\Microsoft.Windows.CppWinRT.2.0.200615.7\build\native\Microsoft.Windows.CppWinRT.targets')" />
184
- </ImportGroup>
185
- <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
186
- <PropertyGroup>
187
- <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
188
- </PropertyGroup>
189
- <Error Condition="!Exists('$(SolutionDir)\packages\Microsoft.Windows.CppWinRT.2.0.200615.7\build\native\Microsoft.Windows.CppWinRT.props')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\packages\Microsoft.Windows.CppWinRT.2.0.200615.7\build\native\Microsoft.Windows.CppWinRT.props'))" />
190
- <Error Condition="!Exists('$(SolutionDir)\packages\Microsoft.Windows.CppWinRT.2.0.200615.7\build\native\Microsoft.Windows.CppWinRT.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\packages\Microsoft.Windows.CppWinRT.2.0.200615.7\build\native\Microsoft.Windows.CppWinRT.targets'))" />
191
- </Target>
192
- <ItemGroup>
193
- <ProjectReference Update="$(ReactNativeWindowsDir)\Microsoft.ReactNative\Microsoft.ReactNative.vcxproj">
194
- <ReferenceOutputAssembly>true</ReferenceOutputAssembly>
195
- <LinkLibraryDependencies>true</LinkLibraryDependencies>
196
- </ProjectReference>
197
- </ItemGroup>
198
- </Project>
@@ -1,91 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3
- <ItemGroup>
4
- <Filter Include="Resources">
5
- <UniqueIdentifier>accd3aa8-1ba0-4223-9bbe-0c431709210b</UniqueIdentifier>
6
- <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tga;tiff;tif;png;wav;mfcribbon-ms</Extensions>
7
- </Filter>
8
- <Filter Include="CodePush">
9
- <UniqueIdentifier>{c2eae772-39a8-4b12-aad7-60e9ca2072ef}</UniqueIdentifier>
10
- </Filter>
11
- <Filter Include="miniz">
12
- <UniqueIdentifier>{53513ea0-fe7c-4f69-8d3e-c1a9efbb7333}</UniqueIdentifier>
13
- </Filter>
14
- </ItemGroup>
15
- <ItemGroup>
16
- <ClCompile Include="pch.cpp" />
17
- <ClCompile Include="$(GeneratedFilesDir)module.g.cpp" />
18
- <ClCompile Include="miniz\miniz.c">
19
- <Filter>miniz</Filter>
20
- </ClCompile>
21
- <ClCompile Include="CodePushConfig.cpp">
22
- <Filter>CodePush</Filter>
23
- </ClCompile>
24
- <ClCompile Include="CodePushDownloadHandler.cpp">
25
- <Filter>CodePush</Filter>
26
- </ClCompile>
27
- <ClCompile Include="CodePushNativeModule.cpp">
28
- <Filter>CodePush</Filter>
29
- </ClCompile>
30
- <ClCompile Include="CodePushPackage.cpp">
31
- <Filter>CodePush</Filter>
32
- </ClCompile>
33
- <ClCompile Include="CodePushTelemetryManager.cpp">
34
- <Filter>CodePush</Filter>
35
- </ClCompile>
36
- <ClCompile Include="CodePushUpdateUtils.cpp">
37
- <Filter>CodePush</Filter>
38
- </ClCompile>
39
- <ClCompile Include="CodePushUtils.cpp">
40
- <Filter>CodePush</Filter>
41
- </ClCompile>
42
- <ClCompile Include="FileUtils.cpp">
43
- <Filter>CodePush</Filter>
44
- </ClCompile>
45
- <ClCompile Include="ReactPackageProvider.cpp" />
46
- </ItemGroup>
47
- <ItemGroup>
48
- <ClInclude Include="pch.h" />
49
- <ClInclude Include="miniz\miniz.h">
50
- <Filter>miniz</Filter>
51
- </ClInclude>
52
- <ClInclude Include="CodePushConfig.h">
53
- <Filter>CodePush</Filter>
54
- </ClInclude>
55
- <ClInclude Include="CodePushDownloadHandler.h">
56
- <Filter>CodePush</Filter>
57
- </ClInclude>
58
- <ClInclude Include="CodePushNativeModule.h">
59
- <Filter>CodePush</Filter>
60
- </ClInclude>
61
- <ClInclude Include="CodePushPackage.h">
62
- <Filter>CodePush</Filter>
63
- </ClInclude>
64
- <ClInclude Include="CodePushTelemetryManager.h">
65
- <Filter>CodePush</Filter>
66
- </ClInclude>
67
- <ClInclude Include="CodePushUpdateUtils.h">
68
- <Filter>CodePush</Filter>
69
- </ClInclude>
70
- <ClInclude Include="CodePushUtils.h">
71
- <Filter>CodePush</Filter>
72
- </ClInclude>
73
- <ClInclude Include="FileUtils.h">
74
- <Filter>CodePush</Filter>
75
- </ClInclude>
76
- <ClInclude Include="ReactPackageProvider.h" />
77
- </ItemGroup>
78
- <ItemGroup>
79
- <None Include="CodePush.def" />
80
- <None Include="packages.config" />
81
- </ItemGroup>
82
- <ItemGroup>
83
- <None Include="PropertySheet.props" />
84
- </ItemGroup>
85
- <ItemGroup>
86
- <Midl Include="ReactPackageProvider.idl" />
87
- <Midl Include="CodePushConfig.idl">
88
- <Filter>CodePush</Filter>
89
- </Midl>
90
- </ItemGroup>
91
- </Project>
@@ -1,104 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT License.
3
-
4
- #include "pch.h"
5
- #include "CodePushConfig.h"
6
- #include "CodePushConfig.g.cpp"
7
- #include "CodePushNativeModule.h"
8
-
9
- #include "winrt/Windows.Foundation.Collections.h"
10
- #include "winrt/Windows.Storage.h"
11
-
12
- namespace winrt::Microsoft::CodePush::ReactNative::implementation
13
- {
14
- using namespace Windows::Storage;
15
- using namespace Windows::Data::Json;
16
- using namespace Windows::Foundation::Collections;
17
-
18
- CodePushConfig CodePushConfig::s_currentConfig{};
19
-
20
- /*static*/ CodePushConfig& CodePushConfig::Current() noexcept
21
- {
22
- return s_currentConfig;
23
- }
24
-
25
- JsonObject CodePushConfig::GetConfiguration()
26
- {
27
- JsonObject configObject;
28
- for (const auto& pair : m_configuration)
29
- {
30
- configObject.Insert(pair.Key(), JsonValue::CreateStringValue(pair.Value()));
31
- }
32
- return configObject;
33
- }
34
-
35
- /*static*/ void CodePushConfig::Init(IMap<hstring, hstring> const& configMap) noexcept
36
- {
37
- std::optional<hstring> appVersion;
38
- std::optional<hstring> buildVersion;
39
- std::optional<hstring> deploymentKey;
40
- std::optional<hstring> publicKey;
41
- std::optional<hstring> serverUrl;
42
-
43
- if (configMap != nullptr)
44
- {
45
- appVersion = configMap.TryLookup(AppVersionConfigKey);
46
- buildVersion = configMap.TryLookup(BuildVersionConfigKey);
47
- deploymentKey = configMap.TryLookup(DeploymentKeyConfigKey);
48
- publicKey = configMap.TryLookup(PublicKeyKey);
49
- serverUrl = configMap.TryLookup(ServerURLConfigKey);
50
- }
51
-
52
- s_currentConfig.m_configuration = winrt::single_threaded_map<hstring, hstring>();
53
- auto addToConfiguration = [=](std::wstring_view key, std::optional<hstring> optValue) {
54
- if (optValue.has_value())
55
- {
56
- s_currentConfig.m_configuration.Insert(key, optValue.value());
57
- }
58
- };
59
-
60
- auto localSettings{ ::Microsoft::CodePush::ReactNative::CodePushNativeModule::GetLocalSettings() };
61
- hstring clientUniqueId;
62
- auto clientUniqueIdData{ localSettings.Values().TryLookup(ClientUniqueIDConfigKey) };
63
- if (clientUniqueIdData == nullptr)
64
- {
65
- auto newGuid{ GuidHelper::CreateNewGuid() };
66
- clientUniqueId = to_hstring(newGuid);
67
- localSettings.Values().Insert(ClientUniqueIDConfigKey, box_value(clientUniqueId));
68
- }
69
- else
70
- {
71
- clientUniqueId = unbox_value<hstring>(clientUniqueIdData);
72
- }
73
-
74
- addToConfiguration(AppVersionConfigKey, appVersion);
75
- addToConfiguration(BuildVersionConfigKey, buildVersion);
76
- addToConfiguration(DeploymentKeyConfigKey, deploymentKey);
77
- addToConfiguration(PublicKeyKey, publicKey);
78
- addToConfiguration(ServerURLConfigKey, serverUrl);
79
-
80
- s_currentConfig.m_configuration.Insert(ClientUniqueIDConfigKey, clientUniqueId);
81
-
82
- if (!serverUrl.has_value())
83
- {
84
- s_currentConfig.m_configuration.Insert(ServerURLConfigKey, L"https://codepush.appcenter.ms/");
85
- }
86
-
87
- ::Microsoft::CodePush::ReactNative::CodePushNativeModule::LoadBundle();
88
- }
89
-
90
- hstring CodePushConfig::QueryConfig(std::wstring_view key)
91
- {
92
- auto value{ m_configuration.TryLookup(key) };
93
- if (value.has_value())
94
- {
95
- return value.value();
96
- }
97
- return L"";
98
- }
99
-
100
- /*static*/ void CodePushConfig::SetHost(Microsoft::ReactNative::ReactNativeHost const& host) noexcept
101
- {
102
- ::Microsoft::CodePush::ReactNative::CodePushNativeModule::SetHost(host);
103
- }
104
- }
@@ -1,66 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT License.
3
-
4
- #pragma once
5
- #include "CodePushConfig.g.h"
6
-
7
- #include "NativeModules.h"
8
-
9
- #include <string_view>
10
- #include "winrt/Microsoft.ReactNative.h"
11
- #include "winrt/Windows.Data.Json.h"
12
- #include "winrt/Windows.Foundation.Collections.h"
13
-
14
- namespace winrt::Microsoft::CodePush::ReactNative::implementation
15
- {
16
- struct CodePushConfig : CodePushConfigT<CodePushConfig>
17
- {
18
- CodePushConfig() = default;
19
-
20
- static void Init(Windows::Foundation::Collections::IMap<hstring, hstring> const& configMap) noexcept;
21
- static void SetHost(Microsoft::ReactNative::ReactNativeHost const& host) noexcept;
22
-
23
- static CodePushConfig& Current() noexcept;
24
-
25
- hstring GetAppVersion() { return QueryConfig(AppVersionConfigKey); }
26
- void SetAppVersion(std::wstring_view appVersion) { m_configuration.Insert(AppVersionConfigKey, appVersion); }
27
-
28
- hstring GetBuildVersion() { return QueryConfig(BuildVersionConfigKey); }
29
-
30
- Windows::Data::Json::JsonObject GetConfiguration();
31
-
32
- hstring GetDeploymentKey() { return QueryConfig(DeploymentKeyConfigKey); }
33
- void SetDeploymentKey(std::wstring_view deploymentKey) { m_configuration.Insert(DeploymentKeyConfigKey, deploymentKey); }
34
-
35
- hstring GetServerUrl() { return QueryConfig(ServerURLConfigKey); }
36
- void SetServerUrl(std::wstring_view serverUrl) { m_configuration.Insert(ServerURLConfigKey, serverUrl); }
37
-
38
- hstring GetPublicKey() { return QueryConfig(PublicKeyKey); }
39
- void SetPublicKey(std::wstring_view publicKey) { m_configuration.Insert(PublicKeyKey, publicKey); }
40
-
41
- private:
42
- static constexpr std::wstring_view AppVersionConfigKey{ L"appVersion" };
43
- static constexpr std::wstring_view BuildVersionConfigKey{ L"buildVersion" };
44
- static constexpr std::wstring_view ClientUniqueIDConfigKey{ L"clientUniqueId" };
45
- static constexpr std::wstring_view DeploymentKeyConfigKey{ L"deploymentKey" };
46
- static constexpr std::wstring_view ServerURLConfigKey{ L"serverUrl" };
47
- static constexpr std::wstring_view PublicKeyKey{ L"publicKey" };
48
-
49
- Windows::Foundation::Collections::IMap<hstring, hstring> m_configuration;
50
- static CodePushConfig s_currentConfig;
51
-
52
- hstring QueryConfig(std::wstring_view key);
53
- };
54
- }
55
-
56
- namespace winrt::Microsoft::CodePush::ReactNative::factory_implementation
57
- {
58
- struct CodePushConfig : CodePushConfigT<CodePushConfig, implementation::CodePushConfig>
59
- {
60
- };
61
- }
62
-
63
- namespace Microsoft::CodePush::ReactNative
64
- {
65
- using winrt::Microsoft::CodePush::ReactNative::implementation::CodePushConfig;
66
- }