@simplysm/capacitor-plugin-auto-update 12.16.41 → 12.16.42
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/README.md +32 -0
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -8,6 +8,11 @@ Capacitor Auto Update Plugin -- APK installation and OTA update for Android/Brow
|
|
|
8
8
|
npm install @simplysm/capacitor-plugin-auto-update
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
+
**Peer dependencies:**
|
|
12
|
+
|
|
13
|
+
- `@capacitor/core` ^7.0.0
|
|
14
|
+
- `@simplysm/capacitor-plugin-file-system`
|
|
15
|
+
|
|
11
16
|
## API Overview
|
|
12
17
|
|
|
13
18
|
| API | Type | Description |
|
|
@@ -105,6 +110,20 @@ export abstract class AutoUpdate {
|
|
|
105
110
|
| `runAsync` | `opt: { log, serviceClient }` | `Promise<void>` | Run OTA update: check server version via `SdServiceClient`, download APK, and install |
|
|
106
111
|
| `runByExternalStorageAsync` | `opt: { log, dirPath }` | `Promise<void>` | Run update from external storage: scan `dirPath` for APK files, find latest version via semver, and install |
|
|
107
112
|
|
|
113
|
+
#### `runAsync` option fields
|
|
114
|
+
|
|
115
|
+
| Field | Type | Description |
|
|
116
|
+
|-------|------|-------------|
|
|
117
|
+
| `log` | `(messageHtml: string) => void` | Callback to display status/progress messages (may contain HTML) |
|
|
118
|
+
| `serviceClient` | `SdServiceClient` | Connected service client instance; the server must implement `ISdAutoUpdateService` |
|
|
119
|
+
|
|
120
|
+
#### `runByExternalStorageAsync` option fields
|
|
121
|
+
|
|
122
|
+
| Field | Type | Description |
|
|
123
|
+
|-------|------|-------------|
|
|
124
|
+
| `log` | `(messageHtml: string) => void` | Callback to display status/progress messages (may contain HTML) |
|
|
125
|
+
| `dirPath` | `string` | Relative path within external storage containing versioned APK files (e.g. `1.2.3.apk`) |
|
|
126
|
+
|
|
108
127
|
## Usage Examples
|
|
109
128
|
|
|
110
129
|
### Check permission and install an APK
|
|
@@ -141,3 +160,16 @@ await AutoUpdate.runAsync({
|
|
|
141
160
|
serviceClient,
|
|
142
161
|
});
|
|
143
162
|
```
|
|
163
|
+
|
|
164
|
+
### Run auto-update from external storage
|
|
165
|
+
|
|
166
|
+
```typescript
|
|
167
|
+
import { AutoUpdate } from "@simplysm/capacitor-plugin-auto-update";
|
|
168
|
+
|
|
169
|
+
await AutoUpdate.runByExternalStorageAsync({
|
|
170
|
+
log: (messageHtml) => {
|
|
171
|
+
document.getElementById("status")!.innerHTML = messageHtml;
|
|
172
|
+
},
|
|
173
|
+
dirPath: "updates/myapp",
|
|
174
|
+
});
|
|
175
|
+
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@simplysm/capacitor-plugin-auto-update",
|
|
3
|
-
"version": "12.16.
|
|
3
|
+
"version": "12.16.42",
|
|
4
4
|
"description": "심플리즘 패키지 - Capacitor Plugin Auto Update",
|
|
5
5
|
"author": "김석래",
|
|
6
6
|
"repository": {
|
|
@@ -18,18 +18,18 @@
|
|
|
18
18
|
}
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@simplysm/sd-core-common": "12.16.
|
|
22
|
-
"@simplysm/sd-service-client": "12.16.
|
|
23
|
-
"@simplysm/sd-service-common": "12.16.
|
|
21
|
+
"@simplysm/sd-core-common": "12.16.42",
|
|
22
|
+
"@simplysm/sd-service-client": "12.16.42",
|
|
23
|
+
"@simplysm/sd-service-common": "12.16.42",
|
|
24
24
|
"semver": "^7.7.4"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@capacitor/core": "^7.6.
|
|
28
|
-
"@simplysm/capacitor-plugin-file-system": "12.16.
|
|
27
|
+
"@capacitor/core": "^7.6.1",
|
|
28
|
+
"@simplysm/capacitor-plugin-file-system": "12.16.42",
|
|
29
29
|
"@types/semver": "^7.7.1"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
32
|
"@capacitor/core": "^7.0.0",
|
|
33
|
-
"@simplysm/capacitor-plugin-file-system": "12.16.
|
|
33
|
+
"@simplysm/capacitor-plugin-file-system": "12.16.42"
|
|
34
34
|
}
|
|
35
35
|
}
|