react-native-mparticle 2.7.0 → 2.7.1-patch.1

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 (23) hide show
  1. package/.github/workflows/pull-request.yml +31 -0
  2. package/android/.classpath +6 -0
  3. package/android/.gradle/5.4.1/executionHistory/executionHistory.bin +0 -0
  4. package/android/.gradle/5.4.1/executionHistory/executionHistory.lock +0 -0
  5. package/android/.gradle/5.4.1/fileChanges/last-build.bin +0 -0
  6. package/android/.gradle/5.4.1/fileHashes/fileHashes.lock +0 -0
  7. package/android/.gradle/5.4.1/gc.properties +0 -0
  8. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  9. package/android/.gradle/buildOutputCleanup/cache.properties +2 -0
  10. package/android/.gradle/vcs-1/gc.properties +0 -0
  11. package/android/.project +34 -0
  12. package/android/.settings/org.eclipse.buildship.core.prefs +13 -0
  13. package/android/build.gradle +1 -1
  14. package/android/src/main/java/com/mparticle/react/MParticleModule.java +7 -2
  15. package/ios/RNMParticle/RNMParticle.m +5 -0
  16. package/ios/RNMParticle.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
  17. package/ios/RNMParticle.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  18. package/ios/RNMParticle.xcodeproj/project.xcworkspace/xcuserdata/bstalnaker.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  19. package/ios/RNMParticle.xcodeproj/xcuserdata/bstalnaker.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +6 -0
  20. package/ios/RNMParticle.xcodeproj/xcuserdata/bstalnaker.xcuserdatad/xcschemes/xcschememanagement.plist +14 -0
  21. package/js/index.js +5 -0
  22. package/package.json +1 -1
  23. package/.github/workflows/react-ci.yml +0 -22
@@ -0,0 +1,31 @@
1
+ name: "Build and Test"
2
+
3
+ on: [pull_request, push]
4
+
5
+ jobs:
6
+ js-tests:
7
+ name: "JS Tests"
8
+ runs-on: macOS-latest
9
+ steps:
10
+ - name: "Checkout"
11
+ uses: actions/checkout@v2
12
+ - uses: actions/setup-node@master
13
+ - uses: c-hive/gha-yarn-cache@v1
14
+
15
+ - name: "Install node modules"
16
+ run: |
17
+ yarn install
18
+
19
+ - name: "Run test"
20
+ run: |
21
+ yarn test
22
+ android-unit-tests:
23
+ name: "Android Unit Tests"
24
+ runs-on: ubuntu-18.04
25
+ steps:
26
+ - name: "Checkout"
27
+ uses: actions/checkout@v2
28
+
29
+ - name: "Run Android Unit Tests"
30
+ working-directory: android
31
+ run: ./gradlew test
@@ -0,0 +1,6 @@
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>
File without changes
@@ -0,0 +1,2 @@
1
+ #Wed Mar 17 12:51:17 EDT 2021
2
+ gradle.version=5.4.1
File without changes
@@ -0,0 +1,34 @@
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>1669992816070</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>
@@ -0,0 +1,13 @@
1
+ arguments=--init-script /var/folders/g2/z0qqdq651r90nx1z1l28fpj1wbw2yx/T/d146c9752a26f79b52047fb6dc6ed385d064e120494f96f08ca63a317c41f94c.gradle --init-script /var/folders/g2/z0qqdq651r90nx1z1l28fpj1wbw2yx/T/52cde0cfcf3e28b8b7510e992210d9614505e0911af0c190bd590d7158574963.gradle
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
@@ -47,7 +47,7 @@ dependencies {
47
47
  //
48
48
  // (See https://github.com/mparticle/mparticle-android-sdk for the latest version)
49
49
  //
50
- compileOnly 'com.mparticle:android-core:[5.9.3, 5.38.2]'
50
+ compileOnly 'com.mparticle:android-core:[5.9.3, )'
51
51
 
52
52
  //
53
53
  // And, if you want to include kits, you can do so as follows:
@@ -62,13 +62,18 @@ public class MParticleModule extends ReactContextBaseJavaModule {
62
62
  return "MParticle";
63
63
  }
64
64
 
65
+ @ReactMethod
66
+ public void upload() {
67
+ MParticle.getInstance().upload();
68
+ }
69
+
65
70
  @ReactMethod
66
71
  public void logEvent(final String name, int type, final ReadableMap attributesMap) {
67
72
  Map<String, String> attributes = ConvertStringMap(attributesMap);
68
73
  MParticle.EventType eventType = ConvertEventType(type);
69
74
 
70
75
  MPEvent event = new MPEvent.Builder(name, eventType)
71
- .info(attributes)
76
+ .customAttributes(attributes)
72
77
  .build();
73
78
  MParticle.getInstance().logEvent(event);
74
79
  }
@@ -510,7 +515,7 @@ public class MParticleModule extends ReactContextBaseJavaModule {
510
515
  if (map.hasKey("info")) {
511
516
  ReadableMap customInfoMap = map.getMap("info");
512
517
  Map<String, String> customInfo = ConvertStringMap(customInfoMap);
513
- builder.info(customInfo);
518
+ builder.customAttributes(customInfo);
514
519
  }
515
520
 
516
521
  if (map.hasKey("customFlags")) {
@@ -19,6 +19,11 @@ RCT_EXTERN void RCTRegisterModule(Class);
19
19
  RCTRegisterModule(self);
20
20
  }
21
21
 
22
+ RCT_EXPORT_METHOD(upload)
23
+ {
24
+ [[MParticle sharedInstance] upload];
25
+ }
26
+
22
27
  RCT_EXPORT_METHOD(logEvent:(NSString *)eventName type:(NSInteger)type attributes:(NSDictionary *)attributes)
23
28
  {
24
29
  [[MParticle sharedInstance] logEvent:eventName eventType:type eventInfo:attributes];
@@ -0,0 +1,7 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <Workspace
3
+ version = "1.0">
4
+ <FileRef
5
+ location = "self:">
6
+ </FileRef>
7
+ </Workspace>
@@ -0,0 +1,8 @@
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>IDEDidComputeMac32BitWarning</key>
6
+ <true/>
7
+ </dict>
8
+ </plist>
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <Bucket
3
+ uuid = "39402CF6-7BAB-4033-9C4A-41AE5477C134"
4
+ type = "1"
5
+ version = "2.0">
6
+ </Bucket>
@@ -0,0 +1,14 @@
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>
package/js/index.js CHANGED
@@ -84,6 +84,10 @@ const ATTAuthStatus = {
84
84
 
85
85
  // ******** Main API ********
86
86
 
87
+ const upload = () => {
88
+ NativeModules.MParticle.upload()
89
+ }
90
+
87
91
  const logEvent = (eventName, type = EventType.Other, attributes = null) => {
88
92
  NativeModules.MParticle.logEvent(eventName, type, attributes)
89
93
  }
@@ -660,6 +664,7 @@ const MParticle = {
660
664
  GDPRConsent,
661
665
  CCPAConsent,
662
666
 
667
+ upload,
663
668
  logEvent, // Methods
664
669
  logMPEvent,
665
670
  logCommerceEvent,
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "homepage": "https://www.mparticle.com",
5
5
  "license": "Apache-2.0",
6
6
  "repository": "mParticle/react-native-mparticle",
7
- "version": "2.7.0",
7
+ "version": "2.7.1-patch.1",
8
8
  "main": "js/index.js",
9
9
  "scripts": {
10
10
  "test": "./node_modules/standard/bin/cmd.js",
@@ -1,22 +0,0 @@
1
- name: Continuous Integration
2
-
3
- on:
4
- pull_request:
5
- push:
6
-
7
- jobs:
8
- build:
9
- runs-on: macOS-latest
10
- steps:
11
- - name: Checkout
12
- uses: actions/checkout@v2
13
- - uses: actions/setup-node@master
14
- - uses: c-hive/gha-yarn-cache@v1
15
-
16
- - name: Install node modules
17
- run: |
18
- yarn install
19
-
20
- - name: Run test
21
- run: |
22
- yarn test