@bglocation/capacitor 1.1.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.
Files changed (61) hide show
  1. package/CapacitorBackgroundLocation.podspec +19 -0
  2. package/LICENSE.md +97 -0
  3. package/Package.swift +44 -0
  4. package/README.md +264 -0
  5. package/android/build.gradle +74 -0
  6. package/android/src/main/AndroidManifest.xml +37 -0
  7. package/android/src/main/kotlin/dev/bglocation/BackgroundLocationPlugin.kt +684 -0
  8. package/android/src/main/kotlin/dev/bglocation/core/Models.kt +76 -0
  9. package/android/src/main/kotlin/dev/bglocation/core/battery/BGLBatteryHelper.kt +127 -0
  10. package/android/src/main/kotlin/dev/bglocation/core/boot/BGLBootCompletedReceiver.kt +32 -0
  11. package/android/src/main/kotlin/dev/bglocation/core/config/BGLConfigParser.kt +114 -0
  12. package/android/src/main/kotlin/dev/bglocation/core/config/BGLVersion.kt +6 -0
  13. package/android/src/main/kotlin/dev/bglocation/core/debug/BGLDebugLogger.kt +174 -0
  14. package/android/src/main/kotlin/dev/bglocation/core/geofence/BGLGeofenceBroadcastReceiver.kt +93 -0
  15. package/android/src/main/kotlin/dev/bglocation/core/geofence/BGLGeofenceManager.kt +310 -0
  16. package/android/src/main/kotlin/dev/bglocation/core/http/BGLHttpSender.kt +187 -0
  17. package/android/src/main/kotlin/dev/bglocation/core/http/BGLLocationBuffer.kt +152 -0
  18. package/android/src/main/kotlin/dev/bglocation/core/license/BGLBuildConfig.kt +16 -0
  19. package/android/src/main/kotlin/dev/bglocation/core/license/BGLLicenseEnforcer.kt +137 -0
  20. package/android/src/main/kotlin/dev/bglocation/core/license/BGLLicenseValidator.kt +134 -0
  21. package/android/src/main/kotlin/dev/bglocation/core/license/BGLTrialTimer.kt +176 -0
  22. package/android/src/main/kotlin/dev/bglocation/core/location/BGLAdaptiveFilter.kt +94 -0
  23. package/android/src/main/kotlin/dev/bglocation/core/location/BGLHeartbeatTimer.kt +38 -0
  24. package/android/src/main/kotlin/dev/bglocation/core/location/BGLLocationForegroundService.kt +289 -0
  25. package/android/src/main/kotlin/dev/bglocation/core/location/BGLLocationHelpers.kt +72 -0
  26. package/android/src/main/kotlin/dev/bglocation/core/location/BGLPermissionManager.kt +99 -0
  27. package/android/src/main/kotlin/dev/bglocation/core/notification/BGLNotificationHelper.kt +77 -0
  28. package/dist/esm/definitions.d.ts +390 -0
  29. package/dist/esm/definitions.js +3 -0
  30. package/dist/esm/definitions.js.map +1 -0
  31. package/dist/esm/index.d.ts +4 -0
  32. package/dist/esm/index.js +26 -0
  33. package/dist/esm/index.js.map +1 -0
  34. package/dist/esm/web.d.ts +47 -0
  35. package/dist/esm/web.js +231 -0
  36. package/dist/esm/web.js.map +1 -0
  37. package/dist/esm/web.test.d.ts +1 -0
  38. package/dist/esm/web.test.js +940 -0
  39. package/dist/esm/web.test.js.map +1 -0
  40. package/dist/plugin.cjs.js +267 -0
  41. package/dist/plugin.cjs.js.map +1 -0
  42. package/dist/plugin.js +270 -0
  43. package/dist/plugin.js.map +1 -0
  44. package/ios/Sources/BGLocationCore/Config/BGLConfigParser.swift +88 -0
  45. package/ios/Sources/BGLocationCore/Config/BGLVersion.swift +6 -0
  46. package/ios/Sources/BGLocationCore/Debug/BGLDebugLogger.swift +201 -0
  47. package/ios/Sources/BGLocationCore/Geofence/BGLGeofenceManager.swift +538 -0
  48. package/ios/Sources/BGLocationCore/Http/BGLHttpSender.swift +227 -0
  49. package/ios/Sources/BGLocationCore/Http/BGLLocationBuffer.swift +198 -0
  50. package/ios/Sources/BGLocationCore/License/BGLBuildConfig.swift +11 -0
  51. package/ios/Sources/BGLocationCore/License/BGLLicenseEnforcer.swift +134 -0
  52. package/ios/Sources/BGLocationCore/License/BGLLicenseValidator.swift +163 -0
  53. package/ios/Sources/BGLocationCore/License/BGLTrialTimer.swift +168 -0
  54. package/ios/Sources/BGLocationCore/Location/BGLAdaptiveFilter.swift +91 -0
  55. package/ios/Sources/BGLocationCore/Location/BGLHeartbeatTimer.swift +50 -0
  56. package/ios/Sources/BGLocationCore/Location/BGLLocationData.swift +48 -0
  57. package/ios/Sources/BGLocationCore/Location/BGLLocationHelpers.swift +42 -0
  58. package/ios/Sources/BGLocationCore/Location/BGLLocationManager.swift +268 -0
  59. package/ios/Sources/BGLocationCore/Location/BGLPermissionManager.swift +33 -0
  60. package/ios/Sources/BackgroundLocationPlugin/BackgroundLocationPlugin.swift +657 -0
  61. package/package.json +75 -0
package/package.json ADDED
@@ -0,0 +1,75 @@
1
+ {
2
+ "name": "@bglocation/capacitor",
3
+ "version": "1.1.0",
4
+ "description": "Capacitor plugin for continuous background location tracking on iOS and Android",
5
+ "main": "dist/plugin.cjs.js",
6
+ "module": "dist/esm/index.js",
7
+ "types": "dist/esm/index.d.ts",
8
+ "unpkg": "dist/plugin.js",
9
+ "files": [
10
+ "android/src/main/",
11
+ "android/build.gradle",
12
+ "dist/",
13
+ "ios/Sources/",
14
+ "*.podspec",
15
+ "Package.swift"
16
+ ],
17
+ "scripts": {
18
+ "build": "npm run clean && bash scripts/generate-build-epoch.sh && tsc && rollup -c rollup.config.mjs",
19
+ "bundle:native": "bash scripts/bundle-native-core.sh",
20
+ "clean": "rimraf ./dist",
21
+ "docgen": "docgen --api BackgroundLocationPlugin --output-readme README.md --output-json dist/docs.json",
22
+ "verify": "npm run verify:ios && npm run verify:android",
23
+ "verify:ios": "cd ios && pod install && xcodebuild -workspace Plugin.xcworkspace -scheme Plugin -sdk iphonesimulator -quiet",
24
+ "verify:android": "cd android && ./gradlew clean build test -q",
25
+ "test": "vitest run",
26
+ "test:web": "vitest run",
27
+ "test:android": "cd android && ./gradlew test -q",
28
+ "test:ios": "xcodebuild test -scheme CapacitorBackgroundLocation -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 17 Pro' -quiet",
29
+ "test:watch": "vitest",
30
+ "prepublishOnly": "npm run bundle:native && npm run build"
31
+ },
32
+ "author": "Szymon Walczak",
33
+ "license": "ELv2",
34
+ "repository": {
35
+ "type": "git",
36
+ "url": "https://gitlab.com/szymonwalczak/capacitor-background-location"
37
+ },
38
+ "bugs": {
39
+ "url": "https://gitlab.com/szymonwalczak/capacitor-background-location/-/issues"
40
+ },
41
+ "homepage": "https://bglocation.dev",
42
+ "keywords": [
43
+ "capacitor",
44
+ "capacitor-plugin",
45
+ "background-location",
46
+ "geolocation",
47
+ "gps",
48
+ "geofencing",
49
+ "ios",
50
+ "android"
51
+ ],
52
+ "devDependencies": {
53
+ "@capacitor/core": "^8.1.0",
54
+ "@capacitor/docgen": "^0.2.0",
55
+ "@rollup/plugin-node-resolve": "^16.0.0",
56
+ "@rollup/plugin-replace": "^6.0.3",
57
+ "@types/node": "^25.5.0",
58
+ "jsdom": "^28.1.0",
59
+ "rimraf": "^6.0.0",
60
+ "rollup": "^4.0.0",
61
+ "typescript": "~5.7.0",
62
+ "vitest": "^4.0.18"
63
+ },
64
+ "peerDependencies": {
65
+ "@capacitor/core": "^8.0.0"
66
+ },
67
+ "capacitor": {
68
+ "ios": {
69
+ "src": "ios"
70
+ },
71
+ "android": {
72
+ "src": "android"
73
+ }
74
+ }
75
+ }