native-update 1.4.1 → 1.4.3

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.
@@ -11,8 +11,8 @@ buildscript {
11
11
 
12
12
  ext {
13
13
  kotlinVersion = '1.9.22'
14
- compileSdkVersion = 34
15
- targetSdkVersion = 34
14
+ compileSdkVersion = 36
15
+ targetSdkVersion = 36
16
16
  minSdkVersion = 21
17
17
  androidxAppCompatVersion = '1.6.1'
18
18
  androidxCoreVersion = '1.13.1'
@@ -191,9 +191,6 @@ class AppUpdatePlugin(
191
191
  // Emit state change event
192
192
  val eventData = JSObject()
193
193
  eventData.put("status", getInstallStatusString(state.installStatus()))
194
- if (state.installError() != 0) {
195
- eventData.put("installErrorCode", state.installError())
196
- }
197
194
  eventListener?.invoke("appUpdateStateChanged", eventData)
198
195
 
199
196
  // Emit progress event for downloads
@@ -49,7 +49,7 @@ class BackgroundUpdatePlugin : Plugin() {
49
49
  if (config.enabled) {
50
50
  scheduleBackgroundWork(config.checkInterval.toLong())
51
51
  } else {
52
- disableBackgroundUpdates()
52
+ cancelAllBackgroundWork()
53
53
  }
54
54
 
55
55
  call.resolve()
@@ -113,7 +113,7 @@ class BackgroundUpdatePlugin : Plugin() {
113
113
  call.resolve(JSObject().put("granted", granted))
114
114
  }
115
115
 
116
- private fun disableBackgroundUpdates() {
116
+ internal fun cancelAllBackgroundWork() {
117
117
  backgroundUpdateStatus.enabled = false
118
118
  backgroundUpdateStatus.isRunning = false
119
119
  backgroundUpdateStatus.currentTaskId = null
@@ -1,5 +1,6 @@
1
1
  package com.aoneahsan.nativeupdate
2
2
 
3
+ import com.getcapacitor.JSObject
3
4
  import com.getcapacitor.Plugin
4
5
  import com.getcapacitor.PluginCall
5
6
  import com.getcapacitor.PluginMethod
@@ -86,7 +87,7 @@ class NativeUpdatePlugin : Plugin() {
86
87
  try {
87
88
  // Clean up any resources
88
89
  liveUpdatePlugin.cleanup()
89
- backgroundUpdatePlugin.disableBackgroundUpdates()
90
+ backgroundUpdatePlugin.cancelAllBackgroundWork()
90
91
  call.resolve()
91
92
  } catch (e: Exception) {
92
93
  call.reject("Cleanup failed", e)
package/package.json CHANGED
@@ -1,6 +1,9 @@
1
1
  {
2
2
  "name": "native-update",
3
- "version": "1.4.1",
3
+ "version": "1.4.3",
4
+ "engines": {
5
+ "node": ">=24.13.0"
6
+ },
4
7
  "description": "Foundation package for building a comprehensive update system for Capacitor apps. Provides architecture and interfaces but requires backend implementation.",
5
8
  "type": "module",
6
9
  "main": "dist/plugin.cjs.js",
@@ -84,23 +87,23 @@
84
87
  "@capacitor/app": "^8.0.0",
85
88
  "@capacitor/core": "^8.0.1",
86
89
  "@capacitor/device": "^8.0.0",
87
- "@capacitor/filesystem": "^8.0.0",
90
+ "@capacitor/filesystem": "^8.1.0",
88
91
  "@capacitor/ios": "^8.0.1",
89
92
  "@capacitor/preferences": "^8.0.0",
90
93
  "@rollup/plugin-json": "^6.1.0",
91
94
  "@rollup/plugin-node-resolve": "^16.0.3",
92
95
  "@rollup/plugin-terser": "^0.4.4",
93
- "@types/node": "^25.0.9",
96
+ "@types/node": "^25.0.10",
94
97
  "@typescript-eslint/eslint-plugin": "^8.53.1",
95
98
  "@typescript-eslint/parser": "^8.53.1",
96
- "@vitest/ui": "^4.0.17",
99
+ "@vitest/ui": "^4.0.18",
97
100
  "eslint": "^9.39.2",
98
- "happy-dom": "^20.3.4",
99
- "prettier": "^3.8.0",
101
+ "happy-dom": "^20.3.7",
102
+ "prettier": "^3.8.1",
100
103
  "rimraf": "^6.1.2",
101
- "rollup": "^4.55.3",
104
+ "rollup": "^4.56.0",
102
105
  "typescript": "^5.9.3",
103
- "vitest": "^4.0.17"
106
+ "vitest": "^4.0.18"
104
107
  },
105
108
  "peerDependencies": {
106
109
  "@capacitor/core": "^8.0.1"