hypertrack-sdk-react-native 11.0.0 → 11.0.2

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/CHANGELOG.md CHANGED
@@ -3,7 +3,20 @@
3
3
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
4
4
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
5
5
 
6
- ## [11.0.0] - 2023-09-08
6
+ ## [11.0.2] - 2023-09-28
7
+
8
+ ### Changed
9
+
10
+ - Updated HyperTrack Android SDK to 7.0.3
11
+ - Updated HyperTrack iOS SDK to 5.0.2
12
+
13
+ ## [11.0.1] - 2023-09-20
14
+
15
+ ### Fixed
16
+
17
+ - Fixed setting wrong object format for `setMetadata()`
18
+
19
+ ## [11.0.0] - 2023-09-14
7
20
 
8
21
  ### Added
9
22
 
@@ -580,6 +593,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
580
593
 
581
594
  Initial release.
582
595
 
596
+ [11.0.2]: https://github.com/hypertrack/sdk-react-native/releases/tag/11.0.2
597
+ [11.0.1]: https://github.com/hypertrack/sdk-react-native/releases/tag/11.0.1
598
+ [11.0.0]: https://github.com/hypertrack/sdk-react-native/releases/tag/11.0.0
583
599
  [10.0.3]: https://github.com/hypertrack/sdk-react-native/releases/tag/10.0.3
584
600
  [10.0.2]: https://github.com/hypertrack/sdk-react-native/releases/tag/10.0.2
585
601
  [10.0.1]: https://github.com/hypertrack/sdk-react-native/releases/tag/10.0.1
package/LICENSE CHANGED
@@ -1,8 +1,6 @@
1
- # License
2
-
3
1
  MIT License
4
2
 
5
- Copyright (c) 2019 HyperTrack
3
+ Copyright (c) 2023 HyperTrack
6
4
 
7
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
8
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -1,9 +1,9 @@
1
1
  # React Native HyperTrack SDK
2
2
 
3
- ![GitHub](https://img.shields.io/github/license/hypertrack/sdk-react-native.svg)
4
- ![npm](https://img.shields.io/npm/v/hypertrack-sdk-react-native.svg)
5
- ![iOS SDK](https://img.shields.io/badge/iOS%20SDK-5.0.1-brightgreen.svg)
6
- ![Android SDK](https://img.shields.io/badge/Android%20SDK-7.0.1-brightgreen.svg)
3
+ [![GitHub](https://img.shields.io/github/license/hypertrack/sdk-react-native?color=orange)](./LICENSE)
4
+ [![npm](https://img.shields.io/npm/v/hypertrack-sdk-react-native.svg)](https://www.npmjs.com/package/hypertrack-sdk-react-native)
5
+ [![iOS SDK](https://img.shields.io/badge/iOS%20SDK-5.0.2-brightgreen.svg)](https://github.com/hypertrack/sdk-ios)
6
+ [![Android SDK](https://img.shields.io/badge/Android%20SDK-7.0.3-brightgreen.svg)](https://github.com/hypertrack/sdk-android)
7
7
 
8
8
  [HyperTrack](https://www.hypertrack.com) lets you add live location tracking to your mobile app. Live location is made available along with ongoing activity, tracking controls and tracking outage with reasons.
9
9
 
@@ -2,5 +2,5 @@ HyperTrackSdk_kotlinVersion=1.6.21
2
2
  HyperTrackSdk_minSdkVersion=23
3
3
  HyperTrackSdk_targetSdkVersion=30
4
4
  HyperTrackSdk_compileSdkVersion=31
5
- HyperTrackSdk_HyperTrackSDKVersion=7.0.1
5
+ HyperTrackSdk_HyperTrackSDKVersion=7.0.3
6
6
  android.useAndroidX=true
@@ -18,7 +18,7 @@ Pod::Spec.new do |s|
18
18
  s.source_files = "ios/**/*.{h,m,mm,swift}"
19
19
 
20
20
  s.dependency "React-Core"
21
- s.dependency 'HyperTrack', '5.0.1'
21
+ s.dependency 'HyperTrack', '5.0.2'
22
22
 
23
23
  # Don't install the dependencies when we run `pod install` in the old architecture.
24
24
  if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then
@@ -31,27 +31,16 @@ func getDeviceID() -> Result<SuccessResult, FailureResult> {
31
31
  .success(.dict(serializeDeviceID(HyperTrack.deviceID)))
32
32
  }
33
33
 
34
- func getName() -> Result<SuccessResult, FailureResult> {
35
- .success(.dict(serializeName(HyperTrack.name)))
36
- }
37
-
38
- func setName(_ args: [String: Any]) -> Result<SuccessResult, FailureResult> {
39
- deserializeName(args).flatMap { (name: String) in
40
- .success(asVoid(HyperTrack.name = name))
41
- }
34
+ func getErrors() -> Result<SuccessResult, FailureResult> {
35
+ .success(.array(serializeErrors(HyperTrack.errors)))
42
36
  }
43
37
 
44
38
  func getMetadata() -> Result<SuccessResult, FailureResult> {
45
39
  .success(.dict(serializeMetadata(HyperTrack.metadata)))
46
40
  }
47
41
 
48
- func setMetadata(_ map: [String: Any]) -> Result<SuccessResult, FailureResult> {
49
- if let metadata = toJSON(map) {
50
- HyperTrack.metadata = metadata
51
- return .success(.void)
52
- } else {
53
- return .failure(.error("Failed to deserialize metadata"))
54
- }
42
+ func getName() -> Result<SuccessResult, FailureResult> {
43
+ .success(.dict(serializeName(HyperTrack.name)))
55
44
  }
56
45
 
57
46
  func getLocation() -> Result<SuccessResult, FailureResult> {
@@ -80,8 +69,21 @@ func setIsTracking(_ args: [String: Any]) -> Result<SuccessResult, FailureResult
80
69
  }
81
70
  }
82
71
 
83
- func getErrors() -> Result<SuccessResult, FailureResult> {
84
- .success(.array(serializeErrors(HyperTrack.errors)))
72
+ func setMetadata(_ args: [String: Any]) -> Result<SuccessResult, FailureResult> {
73
+ deserializeMetadata(args).flatMap { map in
74
+ if let metadata = toJSON(map) {
75
+ HyperTrack.metadata = metadata
76
+ return .success(.void)
77
+ } else {
78
+ return .failure(.error("Failed to deserialize metadata"))
79
+ }
80
+ }
81
+ }
82
+
83
+ func setName(_ args: [String: Any]) -> Result<SuccessResult, FailureResult> {
84
+ deserializeName(args).flatMap { name in
85
+ .success(asVoid(HyperTrack.name = name))
86
+ }
85
87
  }
86
88
 
87
89
  func asVoid(_: Void) -> SuccessResult {
@@ -69,6 +69,16 @@ func deserializeLocation(_ data: [String: Any]) -> Result<HyperTrack.Location, F
69
69
  return .success(.init(latitude: latitude, longitude: longitude))
70
70
  }
71
71
 
72
+ func deserializeMetadata(_ data: [String: Any]) -> Result<[String: Any], FailureResult> {
73
+ if data[keyType] as? String != typeMetadata {
74
+ return .failure(.fatalError(getParseError(data, key: keyType)))
75
+ }
76
+ guard let value = data[keyValue] as? [String: Any] else {
77
+ return .failure(.fatalError(getParseError(data, key: keyValue)))
78
+ }
79
+ return .success(value)
80
+ }
81
+
72
82
  func deserializeName(_ data: [String: Any]) -> Result<String, FailureResult> {
73
83
  if data[keyType] as? String != typeName {
74
84
  return .failure(.fatalError(getParseError(data, key: keyType)))
package/package.json CHANGED
@@ -1,163 +1,163 @@
1
1
  {
2
- "name": "hypertrack-sdk-react-native",
3
- "version": "11.0.0",
4
- "description": "React Native HyperTrack SDK is a wrapper around native iOS and Android SDKs that allows to integrate HyperTrack into React Native apps.",
5
- "main": "lib/commonjs/index",
6
- "module": "lib/module/index",
7
- "types": "lib/typescript/index.d.ts",
8
- "react-native": "src/index",
9
- "source": "src/index",
10
- "files": [
11
- "src",
12
- "lib",
13
- "android",
14
- "ios",
15
- "cpp",
16
- "hypertrack-sdk-react-native.podspec",
17
- "LICENSE.txt",
18
- "README.md",
19
- "CHANGELOG.md",
20
- "CONTRIBUTING.md",
21
- "!lib/typescript/example",
22
- "!android/build",
23
- "!ios/build",
24
- "!**/__tests__",
25
- "!**/__fixtures__",
26
- "!**/__mocks__"
27
- ],
28
- "scripts": {
29
- "test": "jest",
30
- "typescript": "tsc --noEmit",
31
- "lint": "eslint \"**/*.{js,ts,tsx}\"",
32
- "prepare": "bob build",
33
- "release": "release-it",
34
- "docs": "typedoc --options typedoc.json",
35
- "bootstrap": "yarn && yarn docs"
36
- },
37
- "keywords": [
38
- "react-native",
39
- "ios",
40
- "android",
41
- "hypertrack",
42
- "location",
43
- "tracking"
44
- ],
45
- "repository": "https://github.com/hypertrack/sdk-react-native",
46
- "author": "HyperTrack <help@hypertrack.com> (https://hypertrack.com)",
47
- "license": "MIT",
48
- "bugs": {
49
- "url": "https://github.com/hypertrack/sdk-react-native/issues"
50
- },
51
- "homepage": "https://github.com/hypertrack/sdk-react-native#readme",
52
- "publishConfig": {
53
- "registry": "https://registry.npmjs.org/"
2
+ "name": "hypertrack-sdk-react-native",
3
+ "version": "11.0.2",
4
+ "description": "React Native HyperTrack SDK is a wrapper around native iOS and Android SDKs that allows to integrate HyperTrack into React Native apps.",
5
+ "main": "lib/commonjs/index",
6
+ "module": "lib/module/index",
7
+ "types": "lib/typescript/index.d.ts",
8
+ "react-native": "src/index",
9
+ "source": "src/index",
10
+ "files": [
11
+ "src",
12
+ "lib",
13
+ "android",
14
+ "ios",
15
+ "cpp",
16
+ "hypertrack-sdk-react-native.podspec",
17
+ "LICENSE.txt",
18
+ "README.md",
19
+ "CHANGELOG.md",
20
+ "CONTRIBUTING.md",
21
+ "!lib/typescript/example",
22
+ "!android/build",
23
+ "!ios/build",
24
+ "!**/__tests__",
25
+ "!**/__fixtures__",
26
+ "!**/__mocks__"
27
+ ],
28
+ "scripts": {
29
+ "test": "jest",
30
+ "typescript": "tsc --noEmit",
31
+ "lint": "eslint \"**/*.{js,ts,tsx}\"",
32
+ "prepare": "bob build",
33
+ "release": "release-it",
34
+ "docs": "typedoc --options typedoc.json",
35
+ "bootstrap": "yarn && yarn docs"
36
+ },
37
+ "keywords": [
38
+ "react-native",
39
+ "ios",
40
+ "android",
41
+ "hypertrack",
42
+ "location",
43
+ "tracking"
44
+ ],
45
+ "repository": "https://github.com/hypertrack/sdk-react-native",
46
+ "author": "HyperTrack <help@hypertrack.com> (https://hypertrack.com)",
47
+ "license": "MIT",
48
+ "bugs": {
49
+ "url": "https://github.com/hypertrack/sdk-react-native/issues"
50
+ },
51
+ "homepage": "https://github.com/hypertrack/sdk-react-native#readme",
52
+ "publishConfig": {
53
+ "registry": "https://registry.npmjs.org/"
54
+ },
55
+ "devDependencies": {
56
+ "@babel/eslint-parser": "^7.18.2",
57
+ "@commitlint/config-conventional": "^17.0.2",
58
+ "@react-native-community/eslint-config": "^3.0.2",
59
+ "@release-it/bumper": "^4.0.0",
60
+ "@release-it/conventional-changelog": "^5.1.0",
61
+ "@types/jest": "^28.1.2",
62
+ "@types/react": "~17.0.21",
63
+ "@types/react-native": "0.68.0",
64
+ "@typescript-eslint/parser": "^5.30.5",
65
+ "auto-changelog": "^2.4.0",
66
+ "commitlint": "^17.0.2",
67
+ "eslint": "^8.4.1",
68
+ "eslint-config-prettier": "^8.5.0",
69
+ "eslint-plugin-prettier": "^4.0.0",
70
+ "jest": "^28.1.1",
71
+ "pod-install": "^0.1.0",
72
+ "prettier": "^2.0.5",
73
+ "react": "^18.0.0",
74
+ "react-native": "^0.70.0",
75
+ "react-native-builder-bob": "^0.18.3",
76
+ "release-it": "^15.4.1",
77
+ "typedoc": "^0.23.14",
78
+ "typedoc-plugin-merge-modules": "^4.0.0",
79
+ "typedoc-plugin-rename-defaults": "^0.6.1",
80
+ "typescript": "^4.5.2"
81
+ },
82
+ "resolutions": {
83
+ "@types/react": "17.0.21"
84
+ },
85
+ "peerDependencies": {
86
+ "react": "*",
87
+ "react-native": "*"
88
+ },
89
+ "jest": {
90
+ "preset": "react-native",
91
+ "modulePathIgnorePatterns": [
92
+ "<rootDir>/lib/"
93
+ ]
94
+ },
95
+ "commitlint": {
96
+ "extends": [
97
+ "@commitlint/config-conventional"
98
+ ]
99
+ },
100
+ "release-it": {
101
+ "git": {
102
+ "changelog": "auto-changelog --stdout --commit-limit false --unreleased --template https://raw.githubusercontent.com/release-it/release-it/master/templates/changelog-compact.hbs",
103
+ "commitMessage": "Release ${version}",
104
+ "requireCleanWorkingDir": false,
105
+ "tagName": "${version}",
106
+ "requireCommits": true
54
107
  },
55
- "devDependencies": {
56
- "@babel/eslint-parser": "^7.18.2",
57
- "@commitlint/config-conventional": "^17.0.2",
58
- "@react-native-community/eslint-config": "^3.0.2",
59
- "@release-it/bumper": "^4.0.0",
60
- "@release-it/conventional-changelog": "^5.1.0",
61
- "@types/jest": "^28.1.2",
62
- "@types/react": "~17.0.21",
63
- "@types/react-native": "0.68.0",
64
- "@typescript-eslint/parser": "^5.30.5",
65
- "auto-changelog": "^2.4.0",
66
- "commitlint": "^17.0.2",
67
- "eslint": "^8.4.1",
68
- "eslint-config-prettier": "^8.5.0",
69
- "eslint-plugin-prettier": "^4.0.0",
70
- "jest": "^28.1.1",
71
- "pod-install": "^0.1.0",
72
- "prettier": "^2.0.5",
73
- "react": "^18.0.0",
74
- "react-native": "^0.70.0",
75
- "react-native-builder-bob": "^0.18.3",
76
- "release-it": "^15.4.1",
77
- "typedoc": "^0.23.14",
78
- "typedoc-plugin-merge-modules": "^4.0.0",
79
- "typedoc-plugin-rename-defaults": "^0.6.1",
80
- "typescript": "^4.5.2"
108
+ "github": {
109
+ "release": true
81
110
  },
82
- "resolutions": {
83
- "@types/react": "17.0.21"
111
+ "hooks": {
112
+ "after:bump": "auto-changelog --package --commit-limit false --template https://raw.githubusercontent.com/release-it/release-it/master/templates/keepachangelog.hbs"
84
113
  },
85
- "peerDependencies": {
86
- "react": "*",
87
- "react-native": "*"
88
- },
89
- "jest": {
90
- "preset": "react-native",
91
- "modulePathIgnorePatterns": [
92
- "<rootDir>/lib/"
93
- ]
94
- },
95
- "commitlint": {
96
- "extends": [
97
- "@commitlint/config-conventional"
98
- ]
99
- },
100
- "release-it": {
101
- "git": {
102
- "changelog": "auto-changelog --stdout --commit-limit false --unreleased --template https://raw.githubusercontent.com/release-it/release-it/master/templates/changelog-compact.hbs",
103
- "commitMessage": "Release ${version}",
104
- "requireCleanWorkingDir": false,
105
- "tagName": "${version}",
106
- "requireCommits": true
107
- },
108
- "github": {
109
- "release": true
110
- },
111
- "hooks": {
112
- "after:bump": "auto-changelog --package --commit-limit false --template https://raw.githubusercontent.com/release-it/release-it/master/templates/keepachangelog.hbs"
113
- },
114
- "npm": {
115
- "publish": true
116
- }
117
- },
118
- "eslintConfig": {
119
- "root": true,
120
- "parser": "@typescript-eslint/parser",
121
- "extends": [
122
- "@react-native-community",
123
- "prettier"
124
- ],
125
- "rules": {
126
- "prettier/prettier": [
127
- "error",
128
- {
129
- "quoteProps": "consistent",
130
- "singleQuote": true,
131
- "tabWidth": 2,
132
- "trailingComma": "es5",
133
- "useTabs": false
134
- }
135
- ]
136
- }
137
- },
138
- "eslintIgnore": [
139
- "node_modules/",
140
- "lib/"
114
+ "npm": {
115
+ "publish": true
116
+ }
117
+ },
118
+ "eslintConfig": {
119
+ "root": true,
120
+ "parser": "@typescript-eslint/parser",
121
+ "extends": [
122
+ "@react-native-community",
123
+ "prettier"
141
124
  ],
142
- "prettier": {
143
- "quoteProps": "consistent",
144
- "singleQuote": true,
145
- "tabWidth": 2,
146
- "trailingComma": "es5",
147
- "useTabs": false
148
- },
149
- "react-native-builder-bob": {
150
- "source": "src",
151
- "output": "lib",
152
- "targets": [
153
- "commonjs",
154
- "module",
155
- [
156
- "typescript",
157
- {
158
- "project": "tsconfig.build.json"
159
- }
160
- ]
161
- ]
125
+ "rules": {
126
+ "prettier/prettier": [
127
+ "error",
128
+ {
129
+ "quoteProps": "consistent",
130
+ "singleQuote": true,
131
+ "tabWidth": 2,
132
+ "trailingComma": "es5",
133
+ "useTabs": false
134
+ }
135
+ ]
162
136
  }
137
+ },
138
+ "eslintIgnore": [
139
+ "node_modules/",
140
+ "lib/"
141
+ ],
142
+ "prettier": {
143
+ "quoteProps": "consistent",
144
+ "singleQuote": true,
145
+ "tabWidth": 2,
146
+ "trailingComma": "es5",
147
+ "useTabs": false
148
+ },
149
+ "react-native-builder-bob": {
150
+ "source": "src",
151
+ "output": "lib",
152
+ "targets": [
153
+ "commonjs",
154
+ "module",
155
+ [
156
+ "typescript",
157
+ {
158
+ "project": "tsconfig.build.json"
159
+ }
160
+ ]
161
+ ]
162
+ }
163
163
  }
File without changes
@@ -1,2 +0,0 @@
1
- #Thu Apr 13 16:52:30 EEST 2023
2
- gradle.version=7.2
File without changes
@@ -1,6 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="CompilerConfiguration">
4
- <bytecodeTargetLevel target="11" />
5
- </component>
6
- </project>
@@ -1,19 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="GradleMigrationSettings" migrationVersion="1" />
4
- <component name="GradleSettings">
5
- <option name="linkedExternalProjectsSettings">
6
- <GradleProjectSettings>
7
- <option name="testRunner" value="GRADLE" />
8
- <option name="distributionType" value="DEFAULT_WRAPPED" />
9
- <option name="externalProjectPath" value="$PROJECT_DIR$" />
10
- <option name="gradleHome" value="/usr/local/Cellar/gradle/8.0.2/libexec" />
11
- <option name="modules">
12
- <set>
13
- <option value="$PROJECT_DIR$" />
14
- </set>
15
- </option>
16
- </GradleProjectSettings>
17
- </option>
18
- </component>
19
- </project>
@@ -1,35 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="RemoteRepositoriesConfiguration">
4
- <remote-repository>
5
- <option name="id" value="central" />
6
- <option name="name" value="Maven Central repository" />
7
- <option name="url" value="https://repo1.maven.org/maven2" />
8
- </remote-repository>
9
- <remote-repository>
10
- <option name="id" value="jboss.community" />
11
- <option name="name" value="JBoss Community repository" />
12
- <option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
13
- </remote-repository>
14
- <remote-repository>
15
- <option name="id" value="MavenRepo" />
16
- <option name="name" value="MavenRepo" />
17
- <option name="url" value="https://repo.maven.apache.org/maven2/" />
18
- </remote-repository>
19
- <remote-repository>
20
- <option name="id" value="React Native sources" />
21
- <option name="name" value="React Native sources" />
22
- <option name="url" value="file:$PROJECT_DIR$/../node_modules/react-native/android/" />
23
- </remote-repository>
24
- <remote-repository>
25
- <option name="id" value="hypertrack" />
26
- <option name="name" value="hypertrack" />
27
- <option name="url" value="https://s3-us-west-2.amazonaws.com/m2.hypertrack.com/" />
28
- </remote-repository>
29
- <remote-repository>
30
- <option name="id" value="Google" />
31
- <option name="name" value="Google" />
32
- <option name="url" value="https://dl.google.com/dl/android/maven2/" />
33
- </remote-repository>
34
- </component>
35
- </project>
@@ -1,6 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="KotlinJpsPluginSettings">
4
- <option name="version" value="1.6.21" />
5
- </component>
6
- </project>
@@ -1,9 +0,0 @@
1
- <project version="4">
2
- <component name="ExternalStorageConfigurationManager" enabled="true" />
3
- <component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="zulu-11" project-jdk-type="JavaSDK">
4
- <output url="file://$PROJECT_DIR$/build/classes" />
5
- </component>
6
- <component name="ProjectType">
7
- <option name="id" value="Android" />
8
- </component>
9
- </project>
@@ -1,6 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="VcsDirectoryMappings">
4
- <mapping directory="$PROJECT_DIR$/.." vcs="Git" />
5
- </component>
6
- </project>
@@ -1,8 +0,0 @@
1
- ## This file must *NOT* be checked into Version Control Systems,
2
- # as it contains information specific to your local configuration.
3
- #
4
- # Location of the SDK. This is only used by Gradle.
5
- # For customization when using a Version Control System, please read the
6
- # header note.
7
- #Thu Jul 06 15:19:21 EEST 2023
8
- sdk.dir=/opt/homebrew/share/android-commandlinetools