react-native-mparticle 2.4.13 → 2.5.0
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.
- package/.github/workflows/release.yml +73 -0
- package/android/src/main/java/com/mparticle/react/MParticleModule.java +28 -1
- package/ios/RNMParticle/RNMParticle.m +2 -2
- package/package.json +1 -1
- package/release.sh +6 -0
- package/android/.classpath +0 -6
- package/android/.gradle/5.4.1/executionHistory/executionHistory.bin +0 -0
- package/android/.gradle/5.4.1/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/5.4.1/fileChanges/last-build.bin +0 -0
- package/android/.gradle/5.4.1/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/5.4.1/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +0 -2
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/.project +0 -34
- package/android/.settings/org.eclipse.buildship.core.prefs +0 -13
- package/ios/RNMParticle.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
- package/ios/RNMParticle.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
- package/ios/RNMParticle.xcodeproj/project.xcworkspace/xcuserdata/bstalnaker.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/ios/RNMParticle.xcodeproj/xcuserdata/bstalnaker.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +0 -6
- package/ios/RNMParticle.xcodeproj/xcuserdata/bstalnaker.xcuserdatad/xcschemes/xcschememanagement.plist +0 -14
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
name: Release SDK
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch
|
|
5
|
+
jobs:
|
|
6
|
+
# SDK release is done from public/master branch.
|
|
7
|
+
confirm-master-branch:
|
|
8
|
+
name: Confirm release is run on public/master branch
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
steps:
|
|
11
|
+
- name: Git checkout
|
|
12
|
+
uses: actions/checkout@v1
|
|
13
|
+
- name: Branch name
|
|
14
|
+
run: |
|
|
15
|
+
BRANCHNAME=${GITHUB_REF##*/}
|
|
16
|
+
echo "pulling branch name, branch name is:"
|
|
17
|
+
echo $BRANCHNAME
|
|
18
|
+
if [ $BRANCHNAME != "master" ]
|
|
19
|
+
then
|
|
20
|
+
echo "You can only run a release from the master branch, you are trying to run it from ${BRANCHNAME}"
|
|
21
|
+
exit 1
|
|
22
|
+
fi
|
|
23
|
+
|
|
24
|
+
# All new code is stored in internal/development. Release from public/master will merge changes from internal/development into
|
|
25
|
+
# public/master, then run semantic-release on public/master to update changelog and release notes. Before semantic-release publishes
|
|
26
|
+
# to npm, it builds the dist/ folder. Finally, commits from public/master are synced back to internal/master and internal/development.
|
|
27
|
+
|
|
28
|
+
react-tests:
|
|
29
|
+
name: Run React Native Unit Tests
|
|
30
|
+
runs-on: ubuntu-18.04
|
|
31
|
+
needs: ['confirm-master-branch']
|
|
32
|
+
steps:
|
|
33
|
+
- name: Checkout
|
|
34
|
+
uses: actions/checkout@v2
|
|
35
|
+
- uses: actions/setup-node@master
|
|
36
|
+
- uses: c-hive/gha-yarn-cache@v1
|
|
37
|
+
|
|
38
|
+
- name: Install node modules
|
|
39
|
+
run: yarn install
|
|
40
|
+
|
|
41
|
+
- name: Run test
|
|
42
|
+
run: yarn test
|
|
43
|
+
|
|
44
|
+
android-unit-tests:
|
|
45
|
+
name: Run Android Unit Tests
|
|
46
|
+
runs-on: ubuntu-18.04
|
|
47
|
+
needs: ['confirm-master-branch']
|
|
48
|
+
steps:
|
|
49
|
+
- name: Checkout
|
|
50
|
+
uses: actions/checkout@v2
|
|
51
|
+
|
|
52
|
+
- name: Run Android Unit Tests
|
|
53
|
+
run: echo "pwd"; pwd; echo "ls:"; ls; cd android; ./gradlew test
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
release-and-sync-repos:
|
|
57
|
+
name: Release and Sync Repos
|
|
58
|
+
runs-on: ubuntu-18.04
|
|
59
|
+
needs: ['android-unit-tests', 'react-tests']
|
|
60
|
+
steps:
|
|
61
|
+
- name: Checkout internal/development
|
|
62
|
+
uses: actions/checkout@v2
|
|
63
|
+
|
|
64
|
+
- name: Setup Node.js
|
|
65
|
+
uses: actions/setup-node@v1
|
|
66
|
+
with:
|
|
67
|
+
node-version: 12.x
|
|
68
|
+
|
|
69
|
+
- name: Install node modules
|
|
70
|
+
run: yarn install
|
|
71
|
+
|
|
72
|
+
- name: Release
|
|
73
|
+
run: ./release.sh ${{ secrets.NPM_TOKEN}}
|
|
@@ -716,7 +716,34 @@ public class MParticleModule extends ReactContextBaseJavaModule {
|
|
|
716
716
|
ReadableMapKeySetIterator iterator = readableMap.keySetIterator();
|
|
717
717
|
while (iterator.hasNextKey()) {
|
|
718
718
|
String key = iterator.nextKey();
|
|
719
|
-
|
|
719
|
+
switch (readableMap.getType(key)) {
|
|
720
|
+
case Null:
|
|
721
|
+
map.put(key, null);
|
|
722
|
+
break;
|
|
723
|
+
case Boolean:
|
|
724
|
+
map.put(key, Boolean.valueOf(readableMap.getBoolean(key)).toString());
|
|
725
|
+
break;
|
|
726
|
+
case Number:
|
|
727
|
+
try {
|
|
728
|
+
map.put(key, Integer.toString(readableMap.getInt(key)));
|
|
729
|
+
} catch (Exception e) {
|
|
730
|
+
try {
|
|
731
|
+
map.put(key, Double.toString(readableMap.getDouble(key)));
|
|
732
|
+
} catch (Exception ex) {
|
|
733
|
+
Logger.warning("Unable to parse value for \"" + key + "\"");
|
|
734
|
+
}
|
|
735
|
+
}
|
|
736
|
+
break;
|
|
737
|
+
case String:
|
|
738
|
+
map.put(key, readableMap.getString(key));
|
|
739
|
+
break;
|
|
740
|
+
case Map:
|
|
741
|
+
Logger.warning("Maps are not supported Attribute value types");
|
|
742
|
+
break;
|
|
743
|
+
case Array:
|
|
744
|
+
Logger.warning("Lists are not supported Attribute value types");
|
|
745
|
+
break;
|
|
746
|
+
}
|
|
720
747
|
}
|
|
721
748
|
}
|
|
722
749
|
|
|
@@ -416,7 +416,7 @@ typedef NS_ENUM(NSUInteger, MPReactCommerceEventAction) {
|
|
|
416
416
|
commerceEvent.action = [RCTConvert MPCommerceEventAction:json[@"productActionType"]];
|
|
417
417
|
commerceEvent.checkoutStep = [json[@"checkoutStep"] intValue];
|
|
418
418
|
commerceEvent.nonInteractive = [json[@"nonInteractive"] boolValue];
|
|
419
|
-
if json[@"shouldUploadEvent"] != nil {
|
|
419
|
+
if (json[@"shouldUploadEvent"] != nil) {
|
|
420
420
|
event.shouldUploadEvent = [json[@"shouldUploadEvent"] boolValue]
|
|
421
421
|
}
|
|
422
422
|
|
|
@@ -605,7 +605,7 @@ typedef NS_ENUM(NSUInteger, MPReactCommerceEventAction) {
|
|
|
605
605
|
event.name = json[@"name"];
|
|
606
606
|
event.startTime = json[@"startTime"];
|
|
607
607
|
event.type = [json[@"type"] intValue];
|
|
608
|
-
if json[@"shouldUploadEvent"] != nil {
|
|
608
|
+
if (json[@"shouldUploadEvent"] != nil) {
|
|
609
609
|
event.shouldUploadEvent = [json[@"shouldUploadEvent"] boolValue]
|
|
610
610
|
}
|
|
611
611
|
|
package/package.json
CHANGED
package/release.sh
ADDED
package/android/.classpath
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<classpath>
|
|
3
|
-
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11/"/>
|
|
4
|
-
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
|
|
5
|
-
<classpathentry kind="output" path="bin/default"/>
|
|
6
|
-
</classpath>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
Binary file
|
|
File without changes
|
package/android/.project
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<projectDescription>
|
|
3
|
-
<name>android</name>
|
|
4
|
-
<comment>Project android created by Buildship.</comment>
|
|
5
|
-
<projects>
|
|
6
|
-
</projects>
|
|
7
|
-
<buildSpec>
|
|
8
|
-
<buildCommand>
|
|
9
|
-
<name>org.eclipse.jdt.core.javabuilder</name>
|
|
10
|
-
<arguments>
|
|
11
|
-
</arguments>
|
|
12
|
-
</buildCommand>
|
|
13
|
-
<buildCommand>
|
|
14
|
-
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
|
|
15
|
-
<arguments>
|
|
16
|
-
</arguments>
|
|
17
|
-
</buildCommand>
|
|
18
|
-
</buildSpec>
|
|
19
|
-
<natures>
|
|
20
|
-
<nature>org.eclipse.jdt.core.javanature</nature>
|
|
21
|
-
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
|
|
22
|
-
</natures>
|
|
23
|
-
<filteredResources>
|
|
24
|
-
<filter>
|
|
25
|
-
<id>1630678802180</id>
|
|
26
|
-
<name></name>
|
|
27
|
-
<type>30</type>
|
|
28
|
-
<matcher>
|
|
29
|
-
<id>org.eclipse.core.resources.regexFilterMatcher</id>
|
|
30
|
-
<arguments>node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
|
|
31
|
-
</matcher>
|
|
32
|
-
</filter>
|
|
33
|
-
</filteredResources>
|
|
34
|
-
</projectDescription>
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
arguments=
|
|
2
|
-
auto.sync=false
|
|
3
|
-
build.scans.enabled=false
|
|
4
|
-
connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER)
|
|
5
|
-
connection.project.dir=
|
|
6
|
-
eclipse.preferences.version=1
|
|
7
|
-
gradle.user.home=
|
|
8
|
-
java.home=/Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home
|
|
9
|
-
jvm.arguments=
|
|
10
|
-
offline.mode=false
|
|
11
|
-
override.workspace.settings=true
|
|
12
|
-
show.console.view=true
|
|
13
|
-
show.executions.view=true
|
|
Binary file
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
-
<plist version="1.0">
|
|
4
|
-
<dict>
|
|
5
|
-
<key>SchemeUserState</key>
|
|
6
|
-
<dict>
|
|
7
|
-
<key>RNMParticle.xcscheme_^#shared#^_</key>
|
|
8
|
-
<dict>
|
|
9
|
-
<key>orderHint</key>
|
|
10
|
-
<integer>0</integer>
|
|
11
|
-
</dict>
|
|
12
|
-
</dict>
|
|
13
|
-
</dict>
|
|
14
|
-
</plist>
|