@flomentumsolutions/capacitor-health-extended 0.0.17 → 0.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.
@@ -12,9 +12,9 @@ Pod::Spec.new do |s|
12
12
  s.source = { :git => package['repository']['url'], :tag => s.version.to_s }
13
13
  # Only include Swift/Obj-C source files that belong to the plugin
14
14
  s.source_files = 'ios/Sources/HealthPluginPlugin/**/*.{swift,h,m}'
15
- s.ios.deployment_target = '13.0'
16
- s.dependency 'Capacitor', '~> 6.2'
17
- s.dependency 'CapacitorCordova', '~> 6.2'
18
- # Match the Swift shipped with Xcode 16 (use 5.9 for Xcode 15.x)
19
- s.swift_version = '5.9'
15
+ s.ios.deployment_target = '14.0'
16
+ s.dependency 'Capacitor', '~> 7.0'
17
+ s.dependency 'CapacitorCordova', '~> 7.0'
18
+ # Match the Swift shipped with Xcode 16
19
+ s.swift_version = '5.10'
20
20
  end
package/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # capacitor-health-extended
2
2
 
3
- Capacitor plugin to query data from Apple Health and Google Health Connect
3
+ Cross‑platform Capacitor plugin for reading data from Apple HealthKit and
4
+ Google Health Connect. The plugin requires **Node.js 20+** and is compatible
5
+ with **Capacitor 7**.
4
6
 
5
7
  ## Thanks and attribution
6
8
 
@@ -10,6 +12,19 @@ Forked from [capacitor-health](https://github.,com/mley/capacitor-health) and as
10
12
 
11
13
  Thanks [@mley](https://github.com/mley) for the ground work. The goal of this fork is to extend functionality and datapoints and keep up with the ever-changing brand-new Android Health Connect Platform. I'm hoping to create platform parity for capacitor API-based health data access.
12
14
 
15
+ ## Requirements
16
+
17
+ - Node.js 20 or newer
18
+ - Capacitor 7
19
+
20
+ ## Features
21
+
22
+ - Check if health functionality is available on the device
23
+ - Request and verify health permissions
24
+ - Query aggregated data like steps or calories
25
+ - Retrieve workout sessions with optional route and heart rate data
26
+ - Fetch the latest sample for steps, heart‑rate, or weight
27
+
13
28
  ## Install
14
29
 
15
30
  ```bash
@@ -98,10 +113,9 @@ npx cap sync
98
113
  ```
99
114
 
100
115
  This setup ensures your WebView will load HTTPS content securely and complies with Android's default network security policy.
101
- ```
102
116
 
103
117
  ## API
104
-
118
+ ```
105
119
  <docgen-index>
106
120
 
107
121
  * [`isHealthAvailable()`](#ishealthavailable)
@@ -121,7 +135,7 @@ This setup ensures your WebView will load HTTPS content securely and complies wi
121
135
  * [Type Aliases](#type-aliases)
122
136
 
123
137
  </docgen-index>
124
-
138
+ ```
125
139
  <docgen-api>
126
140
  <!--Update the source file JSDoc comments and rerun docgen to update the docs below-->
127
141
 
@@ -42,11 +42,11 @@ android {
42
42
  abortOnError false
43
43
  }
44
44
  compileOptions {
45
- sourceCompatibility JavaVersion.VERSION_17
46
- targetCompatibility JavaVersion.VERSION_17
45
+ sourceCompatibility JavaVersion.VERSION_21
46
+ targetCompatibility JavaVersion.VERSION_21
47
47
  }
48
48
  kotlinOptions {
49
- jvmTarget = '17'
49
+ jvmTarget = '21'
50
50
  }
51
51
  }
52
52
 
@@ -270,7 +270,7 @@ class HealthPlugin : Plugin() {
270
270
  private fun getMetricAndMapper(dataType: String): MetricAndMapper {
271
271
  return when (dataType) {
272
272
  "steps" -> metricAndMapper("steps", CapHealthPermission.READ_STEPS, StepsRecord.COUNT_TOTAL) { it?.toDouble() }
273
- "active-calories" -> metricAndMapper(
273
+ "active-calories", "activeCalories" -> metricAndMapper(
274
274
  "calories",
275
275
  CapHealthPermission.READ_ACTIVE_CALORIES,
276
276
  ActiveCaloriesBurnedRecord.ACTIVE_CALORIES_TOTAL
@@ -301,7 +301,7 @@ class HealthPlugin : Plugin() {
301
301
  CoroutineScope(Dispatchers.IO).launch {
302
302
  try {
303
303
  val result = when (dataType) {
304
- "heart-rate" -> readLatestHeartRate()
304
+ "heart-rate", "heartRate" -> readLatestHeartRate()
305
305
  "weight" -> readLatestWeight()
306
306
  "height" -> readLatestHeight()
307
307
  "steps" -> readLatestSteps()
@@ -370,11 +370,11 @@ class HealthPlugin : Plugin() {
370
370
  timeRangeFilter = TimeRangeFilter.after(Instant.EPOCH),
371
371
  pageSize = 1
372
372
  )
373
- val result = healthConnectClient.readRecords(request)
374
- val record = result.records.firstOrNull() ?: throw Exception("No weight data found")
373
+ val record = healthConnectClient.readRecords(request).records.firstOrNull()
374
+
375
375
  return JSObject().apply {
376
- put("value", record.weight.inKilograms)
377
- put("timestamp", record.time.epochSecond * 1000) // Convert to milliseconds like iOS
376
+ put("value", record?.weight?.inKilograms ?: 0)
377
+ put("timestamp", (record?.time?.epochSecond ?: 0) * 1000)
378
378
  put("unit", "kg")
379
379
  }
380
380
  }
@@ -388,11 +388,10 @@ class HealthPlugin : Plugin() {
388
388
  timeRangeFilter = TimeRangeFilter.after(Instant.EPOCH),
389
389
  pageSize = 1
390
390
  )
391
- val result = healthConnectClient.readRecords(request)
392
- val record = result.records.firstOrNull() ?: throw Exception("No step data found")
391
+ val record = healthConnectClient.readRecords(request).records.firstOrNull()
393
392
  return JSObject().apply {
394
- put("value", record.count)
395
- put("timestamp", record.endTime.epochSecond * 1000) // Convert to milliseconds like iOS
393
+ put("value", record?.count ?: 0)
394
+ put("timestamp", (record?.endTime?.epochSecond ?: 0) * 1000)
396
395
  put("unit", "count")
397
396
  }
398
397
  }
@@ -406,11 +405,11 @@ class HealthPlugin : Plugin() {
406
405
  timeRangeFilter = TimeRangeFilter.after(Instant.EPOCH),
407
406
  pageSize = 1
408
407
  )
409
- val result = healthConnectClient.readRecords(request)
410
- val record = result.records.firstOrNull() ?: throw Exception("No HRV data found")
408
+ val record = healthConnectClient.readRecords(request).records.firstOrNull()
409
+
411
410
  return JSObject().apply {
412
- put("value", record.heartRateVariabilityMillis)
413
- put("timestamp", record.time.epochSecond * 1000) // Convert to milliseconds like iOS
411
+ put("value", record?.heartRateVariabilityMillis ?: 0)
412
+ put("timestamp", (record?.time?.epochSecond ?: 0) * 1000)
414
413
  put("unit", "ms")
415
414
  }
416
415
  }
@@ -424,12 +423,12 @@ class HealthPlugin : Plugin() {
424
423
  timeRangeFilter = TimeRangeFilter.after(Instant.EPOCH),
425
424
  pageSize = 1
426
425
  )
427
- val result = healthConnectClient.readRecords(request)
428
- val record = result.records.firstOrNull() ?: throw Exception("No blood pressure data found")
426
+ val record = healthConnectClient.readRecords(request).records.firstOrNull()
427
+
429
428
  return JSObject().apply {
430
- put("systolic", record.systolic.inMillimetersOfMercury)
431
- put("diastolic", record.diastolic.inMillimetersOfMercury)
432
- put("timestamp", record.time.epochSecond * 1000) // Convert to milliseconds like iOS
429
+ put("systolic", record?.systolic?.inMillimetersOfMercury ?: 0)
430
+ put("diastolic", record?.diastolic?.inMillimetersOfMercury ?: 0)
431
+ put("timestamp", (record?.time?.epochSecond ?: 0) * 1000)
433
432
  put("unit", "mmHg")
434
433
  }
435
434
  }
@@ -443,11 +442,11 @@ class HealthPlugin : Plugin() {
443
442
  timeRangeFilter = TimeRangeFilter.after(Instant.EPOCH),
444
443
  pageSize = 1
445
444
  )
446
- val result = healthConnectClient.readRecords(request)
447
- val record = result.records.firstOrNull() ?: throw Exception("No height data found")
445
+ val record = healthConnectClient.readRecords(request).records.firstOrNull()
446
+
448
447
  return JSObject().apply {
449
- put("value", record.height.inMeters)
450
- put("timestamp", record.time.epochSecond * 1000) // Convert to milliseconds like iOS
448
+ put("value", record?.height?.inMeters ?: 0)
449
+ put("timestamp", (record?.time?.epochSecond ?: 0) * 1000)
451
450
  put("unit", "m")
452
451
  }
453
452
  }
@@ -461,11 +460,10 @@ class HealthPlugin : Plugin() {
461
460
  timeRangeFilter = TimeRangeFilter.after(Instant.EPOCH),
462
461
  pageSize = 1
463
462
  )
464
- val result = healthConnectClient.readRecords(request)
465
- val record = result.records.firstOrNull() ?: throw Exception("No distance data found")
463
+ val record = healthConnectClient.readRecords(request).records.firstOrNull()
466
464
  return JSObject().apply {
467
- put("value", record.distance.inMeters)
468
- put("timestamp", record.endTime.epochSecond * 1000) // Convert to milliseconds like iOS
465
+ put("value", record?.distance?.inMeters ?: 0)
466
+ put("timestamp", (record?.endTime?.epochSecond ?: 0) * 1000)
469
467
  put("unit", "m")
470
468
  }
471
469
  }
@@ -479,11 +477,10 @@ class HealthPlugin : Plugin() {
479
477
  timeRangeFilter = TimeRangeFilter.after(Instant.EPOCH),
480
478
  pageSize = 1
481
479
  )
482
- val result = healthConnectClient.readRecords(request)
483
- val record = result.records.firstOrNull() ?: throw Exception("No active calories data found")
480
+ val record = healthConnectClient.readRecords(request).records.firstOrNull()
484
481
  return JSObject().apply {
485
- put("value", record.energy.inKilocalories)
486
- put("timestamp", record.endTime.epochSecond * 1000) // Convert to milliseconds like iOS
482
+ put("value", record?.energy?.inKilocalories ?: 0)
483
+ put("timestamp", (record?.endTime?.epochSecond ?: 0) * 1000)
487
484
  put("unit", "kcal")
488
485
  }
489
486
  }
@@ -497,11 +494,10 @@ class HealthPlugin : Plugin() {
497
494
  timeRangeFilter = TimeRangeFilter.after(Instant.EPOCH),
498
495
  pageSize = 1
499
496
  )
500
- val result = healthConnectClient.readRecords(request)
501
- val record = result.records.firstOrNull() ?: throw Exception("No total calories data found")
497
+ val record = healthConnectClient.readRecords(request).records.firstOrNull()
502
498
  return JSObject().apply {
503
- put("value", record.energy.inKilocalories)
504
- put("timestamp", record.endTime.epochSecond * 1000) // Convert to milliseconds like iOS
499
+ put("value", record?.energy?.inKilocalories ?: 0)
500
+ put("timestamp", (record?.endTime?.epochSecond ?: 0) * 1000)
505
501
  put("unit", "kcal")
506
502
  }
507
503
  }
@@ -623,7 +619,7 @@ class HealthPlugin : Plugin() {
623
619
  )
624
620
 
625
621
  return response.map {
626
- val mappedValue = metricAndMapper.getValue(it.result)
622
+ val mappedValue = metricAndMapper.getValue(it.result) ?: 0.0
627
623
  AggregatedSample(it.startTime, it.endTime, mappedValue)
628
624
  }
629
625
 
@@ -1 +1 @@
1
- {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["export interface HealthPlugin {\n /**\n * Checks if health API is available.\n * Android: If false is returned, the Google Health Connect app is probably not installed.\n * See showHealthConnectInPlayStore()\n *\n */\n isHealthAvailable(): Promise<{ available: boolean }>;\n\n /**\n * Android only: Returns for each given permission, if it was granted by the underlying health API\n * @param permissions permissions to query\n */\n checkHealthPermissions(permissions: PermissionsRequest): Promise<PermissionResponse>;\n\n /**\n * Requests the permissions from the user.\n *\n * Android: Apps can ask only a few times for permissions, after that the user has to grant them manually in\n * the Health Connect app. See openHealthConnectSettings()\n *\n * iOS: If the permissions are already granted or denied, this method will just return without asking the user. In iOS\n * we can't really detect if a user granted or denied a permission. The return value reflects the assumption that all\n * permissions were granted.\n *\n * @param permissions permissions to request\n */\n requestHealthPermissions(permissions: PermissionsRequest): Promise<PermissionResponse>;\n\n /**\n * Opens the apps settings, which is kind of wrong, because health permissions are configured under:\n * Settings > Apps > (Apple) Health > Access and Devices > [app-name]\n * But we can't go there directly.\n */\n openAppleHealthSettings(): Promise<void>;\n\n /**\n * Opens the Google Health Connect app\n */\n openHealthConnectSettings(): Promise<void>;\n\n /**\n * Opens the Google Health Connect app in PlayStore\n */\n showHealthConnectInPlayStore(): Promise<void>;\n\n /**\n * Query aggregated data\n * @param request\n */\n queryAggregated(request: QueryAggregatedRequest): Promise<QueryAggregatedResponse>;\n\n /**\n * Query workouts\n * @param request\n */\n queryWorkouts(request: QueryWorkoutRequest): Promise<QueryWorkoutResponse>;\n\n /**\n * Query latest sample for a specific data type\n * @param request\n */\n queryLatestSample(request: { dataType: string }): Promise<QueryLatestSampleResponse>;\n\n /**\n * Query latest weight sample\n */\n queryWeight(): Promise<QueryLatestSampleResponse>;\n\n /**\n * Query latest height sample\n */\n queryHeight(): Promise<QueryLatestSampleResponse>;\n\n /**\n * Query latest heart rate sample\n */\n queryHeartRate(): Promise<QueryLatestSampleResponse>;\n\n /**\n * Query latest steps sample\n */\n querySteps(): Promise<QueryLatestSampleResponse>;\n}\n\nexport declare type HealthPermission =\n | 'READ_STEPS'\n | 'READ_WORKOUTS'\n | 'READ_ACTIVE_CALORIES'\n | 'READ_TOTAL_CALORIES'\n | 'READ_DISTANCE'\n | 'READ_WEIGHT'\n | 'READ_HEIGHT'\n | 'READ_HEART_RATE'\n | 'READ_ROUTE'\n | 'READ_MINDFULNESS'\n | 'READ_HRV'\n | 'READ_BLOOD_PRESSURE';\n\nexport interface PermissionsRequest {\n permissions: HealthPermission[];\n}\n\nexport interface PermissionResponse {\n permissions: { [key: string]: boolean }[];\n}\n\nexport interface QueryWorkoutRequest {\n startDate: string;\n endDate: string;\n includeHeartRate: boolean;\n includeRoute: boolean;\n includeSteps: boolean;\n}\n\nexport interface HeartRateSample {\n timestamp: string;\n bpm: number;\n}\n\nexport interface RouteSample {\n timestamp: string;\n lat: number;\n lng: number;\n alt?: number;\n}\n\nexport interface QueryWorkoutResponse {\n workouts: Workout[];\n}\n\nexport interface Workout {\n startDate: string;\n endDate: string;\n workoutType: string;\n sourceName: string;\n id?: string;\n duration: number;\n distance?: number;\n steps?: number;\n calories: number;\n sourceBundleId: string;\n route?: RouteSample[];\n heartRate?: HeartRateSample[];\n}\n\nexport interface QueryAggregatedRequest {\n startDate: string;\n endDate: string;\n dataType: 'steps' | 'active-calories' | 'mindfulness' | 'hrv' | 'blood-pressure';\n bucket: string;\n}\n\nexport interface QueryAggregatedResponse {\n aggregatedData: AggregatedSample[];\n}\n\nexport interface AggregatedSample {\n startDate: string;\n endDate: string;\n value: number;\n}\n\nexport interface QueryLatestSampleResponse {\n value?: number;\n systolic?: number;\n diastolic?: number;\n timestamp: number;\n unit: string;\n}\n"]}
1
+ {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["export interface HealthPlugin {\n /**\n * Checks if health API is available.\n * Android: If false is returned, the Google Health Connect app is probably not installed.\n * See showHealthConnectInPlayStore()\n *\n */\n isHealthAvailable(): Promise<{ available: boolean }>;\n\n /**\n * Android only: Returns for each given permission, if it was granted by the underlying health API\n * @param permissions permissions to query\n */\n checkHealthPermissions(permissions: PermissionsRequest): Promise<PermissionResponse>;\n\n /**\n * Requests the permissions from the user.\n *\n * Android: Apps can ask only a few times for permissions, after that the user has to grant them manually in\n * the Health Connect app. See openHealthConnectSettings()\n *\n * iOS: If the permissions are already granted or denied, this method will just return without asking the user. In iOS\n * we can't really detect if a user granted or denied a permission. The return value reflects the assumption that all\n * permissions were granted.\n *\n * @param permissions permissions to request\n */\n requestHealthPermissions(permissions: PermissionsRequest): Promise<PermissionResponse>;\n\n /**\n * Opens the apps settings, which is kind of wrong, because health permissions are configured under:\n * Settings > Apps > (Apple) Health > Access and Devices > [app-name]\n * But we can't go there directly.\n */\n openAppleHealthSettings(): Promise<void>;\n\n /**\n * Opens the Google Health Connect app\n */\n openHealthConnectSettings(): Promise<void>;\n\n /**\n * Opens the Google Health Connect app in PlayStore\n */\n showHealthConnectInPlayStore(): Promise<void>;\n\n /**\n * Query aggregated data\n * @param request\n */\n queryAggregated(request: QueryAggregatedRequest): Promise<QueryAggregatedResponse>;\n\n /**\n * Query workouts\n * @param request\n */\n queryWorkouts(request: QueryWorkoutRequest): Promise<QueryWorkoutResponse>;\n\n /**\n * Query latest sample for a specific data type\n * @param request\n */\n queryLatestSample(request: { dataType: string }): Promise<QueryLatestSampleResponse>;\n\n /**\n * Query latest weight sample\n */\n queryWeight(): Promise<QueryLatestSampleResponse>;\n\n /**\n * Query latest height sample\n */\n queryHeight(): Promise<QueryLatestSampleResponse>;\n\n /**\n * Query latest heart rate sample\n */\n queryHeartRate(): Promise<QueryLatestSampleResponse>;\n\n /**\n * Query latest steps sample\n */\n querySteps(): Promise<QueryLatestSampleResponse>;\n}\n\nexport declare type HealthPermission =\n | 'READ_STEPS'\n | 'READ_WORKOUTS'\n | 'READ_ACTIVE_CALORIES'\n | 'READ_TOTAL_CALORIES'\n | 'READ_DISTANCE'\n | 'READ_WEIGHT'\n | 'READ_HEIGHT'\n | 'READ_HEART_RATE'\n | 'READ_ROUTE'\n | 'READ_MINDFULNESS'\n | 'READ_HRV'\n | 'READ_BLOOD_PRESSURE';\n\nexport interface PermissionsRequest {\n permissions: HealthPermission[];\n}\n\nexport interface PermissionResponse {\n permissions: { [key: string]: boolean }[];\n}\n\nexport interface QueryWorkoutRequest {\n startDate: string;\n endDate: string;\n includeHeartRate: boolean;\n includeRoute: boolean;\n includeSteps: boolean;\n}\n\nexport interface HeartRateSample {\n timestamp: string;\n bpm: number;\n}\n\nexport interface RouteSample {\n timestamp: string;\n lat: number;\n lng: number;\n alt?: number;\n}\n\nexport interface QueryWorkoutResponse {\n workouts: Workout[];\n}\n\nexport interface Workout {\n startDate: string;\n endDate: string;\n workoutType: string;\n sourceName: string;\n id?: string;\n duration: number;\n distance?: number;\n steps?: number;\n calories: number;\n sourceBundleId: string;\n route?: RouteSample[];\n heartRate?: HeartRateSample[];\n}\n\nexport interface QueryAggregatedRequest {\n startDate: string;\n endDate: string;\n dataType: 'steps' | 'active-calories' | 'mindfulness' | 'hrv' | 'blood-pressure';\n bucket: string;\n}\n\nexport interface QueryAggregatedResponse {\n aggregatedData: AggregatedSample[];\n}\n\nexport interface AggregatedSample {\n startDate: string;\n endDate: string;\n value: number;\n}\n\nexport interface QueryLatestSampleResponse {\n value?: number;\n systolic?: number;\n diastolic?: number;\n timestamp: number;\n unit: string;\n}"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIjD,MAAM,CAAC,MAAM,MAAM,GAAG,cAAc,CAAe,cAAc,EAAE,EAAE,CAAC,CAAC;AAEvE,cAAc,eAAe,CAAA","sourcesContent":["import { registerPlugin } from '@capacitor/core';\n\nimport type { HealthPlugin } from './definitions';\n\nexport const Health = registerPlugin<HealthPlugin>('HealthPlugin', {});\n\nexport * from './definitions'\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIjD,MAAM,CAAC,MAAM,MAAM,GAAG,cAAc,CAAe,cAAc,EAAE,EAAE,CAAC,CAAC;AAEvE,cAAc,eAAe,CAAC","sourcesContent":["import { registerPlugin } from '@capacitor/core';\n\nimport type { HealthPlugin } from './definitions';\n\nexport const Health = registerPlugin<HealthPlugin>('HealthPlugin', {});\n\nexport * from './definitions';\n"]}
@@ -1,7 +1,5 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
3
  var core = require('@capacitor/core');
6
4
 
7
5
  const Health = core.registerPlugin('HealthPlugin', {});
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.cjs.js","sources":["esm/index.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nexport const Health = registerPlugin('HealthPlugin', {});\nexport * from './definitions';\n//# sourceMappingURL=index.js.map"],"names":["registerPlugin"],"mappings":";;;;;;AACY,MAAC,MAAM,GAAGA,mBAAc,CAAC,cAAc,EAAE,EAAE;;;;"}
1
+ {"version":3,"file":"plugin.cjs.js","sources":["esm/index.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nexport const Health = registerPlugin('HealthPlugin', {});\nexport * from './definitions';\n//# sourceMappingURL=index.js.map"],"names":["registerPlugin"],"mappings":";;;;AACY,MAAC,MAAM,GAAGA,mBAAc,CAAC,cAAc,EAAE,EAAE;;;;"}
package/dist/plugin.js CHANGED
@@ -5,8 +5,6 @@ var capacitorHealthExtendedPlugin = (function (exports, core) {
5
5
 
6
6
  exports.Health = Health;
7
7
 
8
- Object.defineProperty(exports, '__esModule', { value: true });
9
-
10
8
  return exports;
11
9
 
12
10
  })({}, capacitorExports);
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.js","sources":["esm/index.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nexport const Health = registerPlugin('HealthPlugin', {});\nexport * from './definitions';\n//# sourceMappingURL=index.js.map"],"names":["registerPlugin"],"mappings":";;;AACY,OAAC,MAAM,GAAGA,mBAAc,CAAC,cAAc,EAAE,EAAE;;;;;;;;;;;;"}
1
+ {"version":3,"file":"plugin.js","sources":["esm/index.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nexport const Health = registerPlugin('HealthPlugin', {});\nexport * from './definitions';\n//# sourceMappingURL=index.js.map"],"names":["registerPlugin"],"mappings":";;;AACY,OAAC,MAAM,GAAGA,mBAAc,CAAC,cAAc,EAAE,EAAE;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flomentumsolutions/capacitor-health-extended",
3
- "version": "0.0.17",
3
+ "version": "0.1.0",
4
4
  "description": "Capacitor plugin for Apple HealthKit and Google Health Connect Platform",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",
@@ -45,29 +45,29 @@
45
45
  "prettier": "prettier \"**/*.{css,html,ts,js,java}\" --plugin=prettier-plugin-java",
46
46
  "swiftlint": "node-swiftlint",
47
47
  "docgen": "docgen --api HealthPlugin --output-readme README.md --output-json dist/docs.json",
48
- "build": "npm run clean && tsc && rollup -c rollup.config.js",
48
+ "build": "npm run clean && tsc && rollup -c rollup.config.mjs",
49
49
  "clean": "rimraf ./dist",
50
50
  "watch": "tsc --watch",
51
51
  "prepublishOnly": "npm run build"
52
52
  },
53
53
  "devDependencies": {
54
- "@capacitor/android": "^6.0.0",
55
- "@capacitor/core": "^6.2.1",
56
- "@capacitor/docgen": "^0.2.2",
57
- "@capacitor/ios": "^6.0.0",
54
+ "@capacitor/android": "^7.0.0",
55
+ "@capacitor/core": "^7.0.0",
56
+ "@capacitor/docgen": "^0.3.0",
57
+ "@capacitor/ios": "^7.0.0",
58
58
  "@ionic/eslint-config": "^0.4.0",
59
59
  "@ionic/prettier-config": "^4.0.0",
60
- "@ionic/swiftlint-config": "^1.1.2",
60
+ "@ionic/swiftlint-config": "^2.0.0",
61
61
  "eslint": "^8.57.0",
62
- "prettier": "^3.3.3",
63
- "prettier-plugin-java": "^2.6.4",
64
- "rimraf": "^3.0.2",
65
- "rollup": "^2.32.0",
66
- "swiftlint": "^1.0.1",
62
+ "prettier": "^3.4.2",
63
+ "prettier-plugin-java": "^2.6.6",
64
+ "rimraf": "^6.0.1",
65
+ "rollup": "^4.30.1",
66
+ "swiftlint": "^2.0.0",
67
67
  "typescript": "~4.1.5"
68
68
  },
69
69
  "peerDependencies": {
70
- "@capacitor/core": "^6.0.0"
70
+ "@capacitor/core": ">=7.0.0"
71
71
  },
72
72
  "prettier": "@ionic/prettier-config",
73
73
  "swiftlint": "@ionic/swiftlint-config",