@capawesome/capacitor-live-update 5.0.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.
- package/CapawesomeCapacitorLiveUpdate.podspec +20 -0
- package/LICENSE +21 -0
- package/README.md +509 -0
- package/android/build.gradle +62 -0
- package/android/src/main/AndroidManifest.xml +2 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/LiveUpdate.java +613 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/LiveUpdateConfig.java +55 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/LiveUpdatePlugin.java +437 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/LiveUpdatePreferences.java +86 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/classes/api/GetLatestBundleResponse.java +23 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/classes/options/DeleteBundleOptions.java +18 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/classes/options/DownloadBundleOptions.java +27 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/classes/options/SetBundleOptions.java +18 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/classes/options/SetChannelOptions.java +18 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/classes/options/SetCustomIdOptions.java +18 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/classes/results/GetBundleResult.java +24 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/classes/results/GetBundlesResult.java +27 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/classes/results/GetChannelResult.java +21 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/classes/results/GetCustomIdResult.java +22 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/classes/results/GetDeviceIdResult.java +22 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/classes/results/GetVersionCodeResult.java +21 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/classes/results/GetVersionNameResult.java +21 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/classes/results/SyncResult.java +22 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/interfaces/Callback.java +5 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/interfaces/EmptyCallback.java +5 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/interfaces/NonEmptyCallback.java +7 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/interfaces/Result.java +7 -0
- package/android/src/main/res/.gitkeep +0 -0
- package/dist/docs.json +785 -0
- package/dist/esm/definitions.d.ts +356 -0
- package/dist/esm/definitions.js +3 -0
- package/dist/esm/definitions.js.map +1 -0
- package/dist/esm/index.d.ts +4 -0
- package/dist/esm/index.js +7 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/web.d.ts +21 -0
- package/dist/esm/web.js +55 -0
- package/dist/esm/web.js.map +1 -0
- package/dist/plugin.cjs.js +71 -0
- package/dist/plugin.cjs.js.map +1 -0
- package/dist/plugin.js +74 -0
- package/dist/plugin.js.map +1 -0
- package/ios/Plugin/Classes/CustomError.swift +38 -0
- package/ios/Plugin/Classes/Options/DeleteBundleOptions.swift +14 -0
- package/ios/Plugin/Classes/Options/DownloadBundleOptions.swift +20 -0
- package/ios/Plugin/Classes/Options/SetBundleOptions.swift +14 -0
- package/ios/Plugin/Classes/Options/SetChannelOptions.swift +14 -0
- package/ios/Plugin/Classes/Options/SetCustomIdOptions.swift +14 -0
- package/ios/Plugin/Classes/Results/GetBundleResult.swift +16 -0
- package/ios/Plugin/Classes/Results/GetBundlesResult.swift +16 -0
- package/ios/Plugin/Classes/Results/GetChannelResult.swift +16 -0
- package/ios/Plugin/Classes/Results/GetCustomIdResult.swift +16 -0
- package/ios/Plugin/Classes/Results/GetDeviceIdResult.swift +16 -0
- package/ios/Plugin/Classes/Results/GetVersionCodeResult.swift +16 -0
- package/ios/Plugin/Classes/Results/GetVersionNameResult.swift +16 -0
- package/ios/Plugin/Classes/Results/SyncResult.swift +16 -0
- package/ios/Plugin/Info.plist +24 -0
- package/ios/Plugin/LiveUpdate.swift +512 -0
- package/ios/Plugin/LiveUpdateConfig.swift +7 -0
- package/ios/Plugin/LiveUpdatePlugin.h +10 -0
- package/ios/Plugin/LiveUpdatePlugin.m +23 -0
- package/ios/Plugin/LiveUpdatePlugin.swift +247 -0
- package/ios/Plugin/LiveUpdatePreferences.swift +60 -0
- package/ios/Plugin/Protocols/Api/GetLatestBundleResponse.swift +4 -0
- package/ios/Plugin/Protocols/Result.swift +6 -0
- package/package.json +92 -0
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
import Foundation
|
|
2
|
+
import Capacitor
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Please read the Capacitor iOS Plugin Development Guide
|
|
6
|
+
* here: https://capacitorjs.com/docs/plugins/ios
|
|
7
|
+
*/
|
|
8
|
+
@objc(LiveUpdatePlugin)
|
|
9
|
+
public class LiveUpdatePlugin: CAPPlugin {
|
|
10
|
+
public static let tag = "LiveUpdate"
|
|
11
|
+
public static let version = "5.0.0"
|
|
12
|
+
public static let userDefaultsPrefix = "CapawesomeLiveUpdate" // DO NOT CHANGE
|
|
13
|
+
|
|
14
|
+
private var config: LiveUpdateConfig?
|
|
15
|
+
private var implementation: LiveUpdate?
|
|
16
|
+
|
|
17
|
+
override public func load() {
|
|
18
|
+
self.config = liveUpdateConfig()
|
|
19
|
+
self.implementation = LiveUpdate(config: config!, plugin: self)
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
@objc func deleteBundle(_ call: CAPPluginCall) {
|
|
23
|
+
guard let bundleId = call.getString("bundleId") else {
|
|
24
|
+
call.reject(CustomError.bundleIdMissing.localizedDescription)
|
|
25
|
+
return
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
let options = DeleteBundleOptions(bundleId: bundleId)
|
|
29
|
+
|
|
30
|
+
implementation?.deleteBundle(options, completion: { error in
|
|
31
|
+
if let error = error {
|
|
32
|
+
CAPLog.print("[", LiveUpdatePlugin.tag, "] ", error)
|
|
33
|
+
call.reject(error.localizedDescription)
|
|
34
|
+
return
|
|
35
|
+
}
|
|
36
|
+
call.resolve()
|
|
37
|
+
})
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
@objc func downloadBundle(_ call: CAPPluginCall) {
|
|
41
|
+
guard let bundleId = call.getString("bundleId") else {
|
|
42
|
+
call.reject(CustomError.bundleIdMissing.localizedDescription)
|
|
43
|
+
return
|
|
44
|
+
}
|
|
45
|
+
guard let url = call.getString("url") else {
|
|
46
|
+
call.reject(CustomError.urlMissing.localizedDescription)
|
|
47
|
+
return
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
let options = DownloadBundleOptions(bundleId: bundleId, url: url)
|
|
51
|
+
|
|
52
|
+
implementation?.downloadBundle(options, completion: { error in
|
|
53
|
+
if let error = error {
|
|
54
|
+
CAPLog.print("[", LiveUpdatePlugin.tag, "] ", error)
|
|
55
|
+
call.reject(error.localizedDescription)
|
|
56
|
+
return
|
|
57
|
+
}
|
|
58
|
+
call.resolve()
|
|
59
|
+
})
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
@objc func getBundle(_ call: CAPPluginCall) {
|
|
63
|
+
implementation?.getBundle(completion: { result, error in
|
|
64
|
+
if let error = error {
|
|
65
|
+
CAPLog.print("[", LiveUpdatePlugin.tag, "] ", error)
|
|
66
|
+
call.reject(error.localizedDescription)
|
|
67
|
+
return
|
|
68
|
+
}
|
|
69
|
+
if let result = result?.toJSObject() as? JSObject {
|
|
70
|
+
call.resolve(result)
|
|
71
|
+
}
|
|
72
|
+
})
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
@objc func getBundles(_ call: CAPPluginCall) {
|
|
76
|
+
implementation?.getBundles(completion: { result, error in
|
|
77
|
+
if let error = error {
|
|
78
|
+
CAPLog.print("[", LiveUpdatePlugin.tag, "] ", error)
|
|
79
|
+
call.reject(error.localizedDescription)
|
|
80
|
+
return
|
|
81
|
+
}
|
|
82
|
+
if let result = result?.toJSObject() as? JSObject {
|
|
83
|
+
call.resolve(result)
|
|
84
|
+
}
|
|
85
|
+
})
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
@objc func getChannel(_ call: CAPPluginCall) {
|
|
89
|
+
implementation?.getChannel(completion: { result, error in
|
|
90
|
+
if let error = error {
|
|
91
|
+
CAPLog.print("[", LiveUpdatePlugin.tag, "] ", error)
|
|
92
|
+
call.reject(error.localizedDescription)
|
|
93
|
+
return
|
|
94
|
+
}
|
|
95
|
+
if let result = result?.toJSObject() as? JSObject {
|
|
96
|
+
call.resolve(result)
|
|
97
|
+
}
|
|
98
|
+
})
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
@objc func getCustomId(_ call: CAPPluginCall) {
|
|
102
|
+
implementation?.getCustomId(completion: { result, error in
|
|
103
|
+
if let error = error {
|
|
104
|
+
CAPLog.print("[", LiveUpdatePlugin.tag, "] ", error)
|
|
105
|
+
call.reject(error.localizedDescription)
|
|
106
|
+
return
|
|
107
|
+
}
|
|
108
|
+
if let result = result?.toJSObject() as? JSObject {
|
|
109
|
+
call.resolve(result)
|
|
110
|
+
}
|
|
111
|
+
})
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
@objc func getDeviceId(_ call: CAPPluginCall) {
|
|
115
|
+
implementation?.getDeviceId(completion: { result, error in
|
|
116
|
+
if let error = error {
|
|
117
|
+
CAPLog.print("[", LiveUpdatePlugin.tag, "] ", error)
|
|
118
|
+
call.reject(error.localizedDescription)
|
|
119
|
+
return
|
|
120
|
+
}
|
|
121
|
+
if let result = result?.toJSObject() as? JSObject {
|
|
122
|
+
call.resolve(result)
|
|
123
|
+
}
|
|
124
|
+
})
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
@objc func getVersionCode(_ call: CAPPluginCall) {
|
|
128
|
+
implementation?.getVersionCode(completion: { result, error in
|
|
129
|
+
if let error = error {
|
|
130
|
+
CAPLog.print("[", LiveUpdatePlugin.tag, "] ", error)
|
|
131
|
+
call.reject(error.localizedDescription)
|
|
132
|
+
return
|
|
133
|
+
}
|
|
134
|
+
if let result = result?.toJSObject() as? JSObject {
|
|
135
|
+
call.resolve(result)
|
|
136
|
+
}
|
|
137
|
+
})
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
@objc func getVersionName(_ call: CAPPluginCall) {
|
|
141
|
+
implementation?.getVersionName(completion: { result, error in
|
|
142
|
+
if let error = error {
|
|
143
|
+
CAPLog.print("[", LiveUpdatePlugin.tag, "] ", error)
|
|
144
|
+
call.reject(error.localizedDescription)
|
|
145
|
+
return
|
|
146
|
+
}
|
|
147
|
+
if let result = result?.toJSObject() as? JSObject {
|
|
148
|
+
call.resolve(result)
|
|
149
|
+
}
|
|
150
|
+
})
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
@objc func ready(_ call: CAPPluginCall) {
|
|
154
|
+
implementation?.ready()
|
|
155
|
+
call.resolve()
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
@objc func reload(_ call: CAPPluginCall) {
|
|
159
|
+
implementation?.reload()
|
|
160
|
+
call.resolve()
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
@objc func reset(_ call: CAPPluginCall) {
|
|
164
|
+
implementation?.reset()
|
|
165
|
+
call.resolve()
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
@objc func setBundle(_ call: CAPPluginCall) {
|
|
169
|
+
guard let bundleId = call.getString("bundleId") else {
|
|
170
|
+
call.reject(CustomError.bundleIdMissing.localizedDescription)
|
|
171
|
+
return
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
let options = SetBundleOptions(bundleId: bundleId)
|
|
175
|
+
|
|
176
|
+
implementation?.setBundle(options, completion: { error in
|
|
177
|
+
if let error = error {
|
|
178
|
+
CAPLog.print("[", LiveUpdatePlugin.tag, "] ", error)
|
|
179
|
+
call.reject(error.localizedDescription)
|
|
180
|
+
return
|
|
181
|
+
}
|
|
182
|
+
})
|
|
183
|
+
call.resolve()
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
@objc func setChannel(_ call: CAPPluginCall) {
|
|
187
|
+
let channel = call.getString("channel")
|
|
188
|
+
|
|
189
|
+
let options = SetChannelOptions(channel: channel)
|
|
190
|
+
|
|
191
|
+
implementation?.setChannel(options, completion: { error in
|
|
192
|
+
if let error = error {
|
|
193
|
+
CAPLog.print("[", LiveUpdatePlugin.tag, "] ", error)
|
|
194
|
+
call.reject(error.localizedDescription)
|
|
195
|
+
return
|
|
196
|
+
}
|
|
197
|
+
})
|
|
198
|
+
call.resolve()
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
@objc func setCustomId(_ call: CAPPluginCall) {
|
|
202
|
+
guard let customId = call.getString("customId") else {
|
|
203
|
+
call.reject(CustomError.customIdMissing.localizedDescription)
|
|
204
|
+
return
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
let options = SetCustomIdOptions(customId: customId)
|
|
208
|
+
|
|
209
|
+
implementation?.setCustomId(options, completion: { error in
|
|
210
|
+
if let error = error {
|
|
211
|
+
CAPLog.print("[", LiveUpdatePlugin.tag, "] ", error)
|
|
212
|
+
call.reject(error.localizedDescription)
|
|
213
|
+
return
|
|
214
|
+
}
|
|
215
|
+
})
|
|
216
|
+
call.resolve()
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
@objc func sync(_ call: CAPPluginCall) {
|
|
220
|
+
guard let _ = config?.appId else {
|
|
221
|
+
call.reject(CustomError.appIdMissing.localizedDescription)
|
|
222
|
+
return
|
|
223
|
+
}
|
|
224
|
+
implementation?.sync(completion: { result, error in
|
|
225
|
+
if let error = error {
|
|
226
|
+
CAPLog.print("[", LiveUpdatePlugin.tag, "] ", error)
|
|
227
|
+
call.reject(error.localizedDescription)
|
|
228
|
+
return
|
|
229
|
+
}
|
|
230
|
+
if let result = result?.toJSObject() as? JSObject {
|
|
231
|
+
call.resolve(result)
|
|
232
|
+
}
|
|
233
|
+
})
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
private func liveUpdateConfig() -> LiveUpdateConfig {
|
|
237
|
+
var config = LiveUpdateConfig()
|
|
238
|
+
|
|
239
|
+
config.appId = getConfig().getString("appId", config.appId)
|
|
240
|
+
config.autoDeleteBundles = getConfig().getBoolean("autoDeleteBundles", config.autoDeleteBundles)
|
|
241
|
+
config.enabled = getConfig().getBoolean("enabled", config.enabled)
|
|
242
|
+
config.readyTimeout = getConfig().getInt("readyTimeout", config.readyTimeout)
|
|
243
|
+
config.resetOnUpdate = getConfig().getBoolean("resetOnUpdate", config.resetOnUpdate)
|
|
244
|
+
|
|
245
|
+
return config
|
|
246
|
+
}
|
|
247
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import Foundation
|
|
2
|
+
|
|
3
|
+
public class LiveUpdatePreferences: NSObject {
|
|
4
|
+
private let channelKey = "channel" // DO NOT CHANGE
|
|
5
|
+
private let deviceIdKey = "deviceId" // DO NOT CHANGE
|
|
6
|
+
private let customIdKey = "customId" // DO NOT CHANGE
|
|
7
|
+
private let lastBundleVersionKey = "lastBundleVersion" // DO NOT CHANGE
|
|
8
|
+
|
|
9
|
+
public func getChannel() -> String? {
|
|
10
|
+
return UserDefaults.standard.string(forKey: applyPrefix(to: channelKey))
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
public func getDeviceIdForApp(appId: String?) -> String? {
|
|
14
|
+
if let appId = appId {
|
|
15
|
+
return UserDefaults.standard.string(forKey: applyPrefix(to: deviceIdKey + "_" + appId))
|
|
16
|
+
} else {
|
|
17
|
+
return UserDefaults.standard.string(forKey: applyPrefix(to: deviceIdKey))
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
public func getCustomId() -> String? {
|
|
22
|
+
return UserDefaults.standard.string(forKey: applyPrefix(to: customIdKey))
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
public func getLastBundleVersion() -> String? {
|
|
26
|
+
return UserDefaults.standard.string(forKey: applyPrefix(to: lastBundleVersionKey))
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
public func setChannel(_ value: String?) {
|
|
30
|
+
if let value = value {
|
|
31
|
+
UserDefaults.standard.set(value, forKey: applyPrefix(to: channelKey))
|
|
32
|
+
} else {
|
|
33
|
+
UserDefaults.standard.removeObject(forKey: applyPrefix(to: channelKey))
|
|
34
|
+
}
|
|
35
|
+
UserDefaults.standard.synchronize()
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
public func setDeviceIdForApp(appId: String?, _ value: String) {
|
|
39
|
+
if let appId = appId {
|
|
40
|
+
UserDefaults.standard.set(value, forKey: applyPrefix(to: deviceIdKey + "_" + appId))
|
|
41
|
+
} else {
|
|
42
|
+
UserDefaults.standard.set(value, forKey: applyPrefix(to: deviceIdKey))
|
|
43
|
+
}
|
|
44
|
+
UserDefaults.standard.synchronize()
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
public func setCustomId(_ value: String) {
|
|
48
|
+
UserDefaults.standard.set(value, forKey: applyPrefix(to: customIdKey))
|
|
49
|
+
UserDefaults.standard.synchronize()
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
public func setLastBundleVersion(_ value: String) {
|
|
53
|
+
UserDefaults.standard.set(value, forKey: applyPrefix(to: lastBundleVersionKey))
|
|
54
|
+
UserDefaults.standard.synchronize()
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
private func applyPrefix(to key: String) -> String {
|
|
58
|
+
return LiveUpdatePlugin.userDefaultsPrefix + "." + key
|
|
59
|
+
}
|
|
60
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@capawesome/capacitor-live-update",
|
|
3
|
+
"version": "5.0.0",
|
|
4
|
+
"description": "Capacitor plugin to update your app remotely in realtime.",
|
|
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/Plugin/",
|
|
14
|
+
"CapawesomeCapacitorLiveUpdate.podspec"
|
|
15
|
+
],
|
|
16
|
+
"author": "Robin Genz <mail@robingenz.dev>",
|
|
17
|
+
"license": "MIT",
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "git+https://github.com/capawesome-team/capacitor-plugins.git"
|
|
21
|
+
},
|
|
22
|
+
"bugs": {
|
|
23
|
+
"url": "https://github.com/capawesome-team/capacitor-plugins/issues"
|
|
24
|
+
},
|
|
25
|
+
"homepage": "https://capawesome.io/plugins/live-update/",
|
|
26
|
+
"funding": [
|
|
27
|
+
{
|
|
28
|
+
"type": "github",
|
|
29
|
+
"url": "https://github.com/sponsors/capawesome-team/"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"type": "opencollective",
|
|
33
|
+
"url": "https://opencollective.com/capawesome"
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
"keywords": [
|
|
37
|
+
"capacitor",
|
|
38
|
+
"plugin",
|
|
39
|
+
"native"
|
|
40
|
+
],
|
|
41
|
+
"scripts": {
|
|
42
|
+
"verify": "npm run verify:ios && npm run verify:android && npm run verify:web",
|
|
43
|
+
"verify:ios": "cd ios && pod install && xcodebuild -workspace Plugin.xcworkspace -scheme Plugin -destination generic/platform=iOS && cd ..",
|
|
44
|
+
"verify:android": "cd android && ./gradlew clean build test && cd ..",
|
|
45
|
+
"verify:web": "npm run build",
|
|
46
|
+
"lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint",
|
|
47
|
+
"fmt": "npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format",
|
|
48
|
+
"eslint": "eslint . --ext ts",
|
|
49
|
+
"prettier": "prettier \"**/*.{css,html,ts,js,java}\"",
|
|
50
|
+
"swiftlint": "node-swiftlint",
|
|
51
|
+
"docgen": "docgen --api LiveUpdatePlugin --output-readme README.md --output-json dist/docs.json",
|
|
52
|
+
"build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js",
|
|
53
|
+
"clean": "rimraf ./dist",
|
|
54
|
+
"watch": "tsc --watch",
|
|
55
|
+
"prepublishOnly": "npm run build",
|
|
56
|
+
"release": "standard-version"
|
|
57
|
+
},
|
|
58
|
+
"devDependencies": {
|
|
59
|
+
"@capacitor/android": "5.0.0",
|
|
60
|
+
"@capacitor/cli": "5.0.0",
|
|
61
|
+
"@capacitor/core": "5.0.0",
|
|
62
|
+
"@capacitor/docgen": "0.0.17",
|
|
63
|
+
"@capacitor/ios": "5.0.0",
|
|
64
|
+
"@ionic/eslint-config": "0.3.0",
|
|
65
|
+
"@ionic/prettier-config": "2.0.0",
|
|
66
|
+
"@ionic/swiftlint-config": "1.1.2",
|
|
67
|
+
"eslint": "7.32.0",
|
|
68
|
+
"prettier": "2.6.2",
|
|
69
|
+
"prettier-plugin-java": "1.6.1",
|
|
70
|
+
"rimraf": "3.0.2",
|
|
71
|
+
"rollup": "2.77.2",
|
|
72
|
+
"standard-version": "9.5.0",
|
|
73
|
+
"swiftlint": "1.0.1",
|
|
74
|
+
"typescript": "4.1.5"
|
|
75
|
+
},
|
|
76
|
+
"peerDependencies": {
|
|
77
|
+
"@capacitor/core": "^5.0.0"
|
|
78
|
+
},
|
|
79
|
+
"prettier": "@ionic/prettier-config",
|
|
80
|
+
"swiftlint": "@ionic/swiftlint-config",
|
|
81
|
+
"eslintConfig": {
|
|
82
|
+
"extends": "@ionic/eslint-config/recommended"
|
|
83
|
+
},
|
|
84
|
+
"capacitor": {
|
|
85
|
+
"ios": {
|
|
86
|
+
"src": "ios"
|
|
87
|
+
},
|
|
88
|
+
"android": {
|
|
89
|
+
"src": "android"
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|