@capgo/capacitor-autofill-save-password 8.0.2 → 8.0.4

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.
@@ -28,7 +28,7 @@ import java.util.Map;
28
28
  @CapacitorPlugin(name = "SavePassword")
29
29
  public class SavePasswordPlugin extends Plugin {
30
30
 
31
- private final String pluginVersion = "8.0.2";
31
+ private final String pluginVersion = "8.0.4";
32
32
  private static final String TAG = "CredentialManager";
33
33
  private CredentialManager credentialManager;
34
34
  private Map<String, PendingGetCredentialRequest> pendingRequestsByElementId = new HashMap<>();
@@ -9,7 +9,7 @@ import AuthenticationServices
9
9
  */
10
10
  @objc(SavePasswordPlugin)
11
11
  public class SavePasswordPlugin: CAPPlugin, CAPBridgedPlugin, ASAuthorizationControllerDelegate, ASAuthorizationControllerPresentationContextProviding {
12
- private let pluginVersion: String = "8.0.2"
12
+ private let pluginVersion: String = "8.0.4"
13
13
  public let identifier = "SavePasswordPlugin"
14
14
 
15
15
  public let jsName = "SavePassword"
@@ -46,17 +46,13 @@ public class SavePasswordPlugin: CAPPlugin, CAPBridgedPlugin, ASAuthorizationCon
46
46
  }
47
47
 
48
48
  @objc func readPassword(_ call: CAPPluginCall) {
49
- if #available(iOS 12.0, *) {
50
- DispatchQueue.main.async {
51
- let passwordRequest = ASAuthorizationPasswordProvider().createRequest()
52
- let authController = ASAuthorizationController(authorizationRequests: [passwordRequest])
53
- self.currentReadCall = call
54
- authController.delegate = self
55
- authController.presentationContextProvider = self
56
- authController.performRequests()
57
- }
58
- } else {
59
- call.reject("Password autofill not available on this iOS version")
49
+ DispatchQueue.main.async {
50
+ let passwordRequest = ASAuthorizationPasswordProvider().createRequest()
51
+ let authController = ASAuthorizationController(authorizationRequests: [passwordRequest])
52
+ self.currentReadCall = call
53
+ authController.delegate = self
54
+ authController.presentationContextProvider = self
55
+ authController.performRequests()
60
56
  }
61
57
  }
62
58
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capgo/capacitor-autofill-save-password",
3
- "version": "8.0.2",
3
+ "version": "8.0.4",
4
4
  "description": "Prompt to display dialog for saving password to keychain from webview app",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",
@@ -43,7 +43,7 @@
43
43
  "lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint",
44
44
  "fmt": "npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format",
45
45
  "eslint": "eslint . --ext ts",
46
- "prettier": "prettier \"**/*.{css,html,ts,js,java}\" --plugin=prettier-plugin-java",
46
+ "prettier": "prettier-pretty-check \"**/*.{css,html,ts,js,java}\" --plugin=prettier-plugin-java",
47
47
  "swiftlint": "node-swiftlint",
48
48
  "docgen": "docgen --api SavePasswordPlugin --output-readme README.md --output-json dist/docs.json",
49
49
  "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs",
@@ -67,7 +67,8 @@
67
67
  "rimraf": "^6.1.0",
68
68
  "rollup": "^4.53.2",
69
69
  "swiftlint": "^2.0.0",
70
- "typescript": "^5.9.3"
70
+ "typescript": "^5.9.3",
71
+ "prettier-pretty-check": "^0.2.0"
71
72
  },
72
73
  "peerDependencies": {
73
74
  "@capacitor/core": ">=8.0.0"