From ee0f7457e458ca4bb4eb74f67552ac2ace76016b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=AF=8C=E4=B8=9C?= Date: Thu, 3 Aug 2023 23:02:55 +0800 Subject: [PATCH] fix(cli): signing type option issue (#6716) Co-authored-by: fdliu Co-authored-by: Mark Anderson --- cli/src/config.ts | 4 ++++ cli/src/index.ts | 4 ++-- core/native-bridge.ts | 1 + ios/Capacitor/Capacitor/JS.swift | 20 -------------------- 4 files changed, 7 insertions(+), 22 deletions(-) diff --git a/cli/src/config.ts b/cli/src/config.ts index 670be5255..ecf4feffc 100644 --- a/cli/src/config.ts +++ b/cli/src/config.ts @@ -239,6 +239,10 @@ async function loadAndroidConfig( const buildOptions = { keystorePath: extConfig.android?.buildOptions?.keystorePath, keystorePassword: extConfig.android?.buildOptions?.keystorePassword, + keystoreAlias: extConfig.android?.buildOptions?.keystoreAlias, + keystoreAliasPassword: + extConfig.android?.buildOptions?.keystoreAliasPassword, + signingType: extConfig.android?.buildOptions?.signingType, releaseType: extConfig.android?.buildOptions?.releaseType, }; diff --git a/cli/src/index.ts b/cli/src/index.ts index 9385aee56..2826d469b 100644 --- a/cli/src/index.ts +++ b/cli/src/index.ts @@ -174,7 +174,7 @@ export function runProgram(config: Config): void { keystorealias, keystorealiaspass, androidreleasetype, - signingtype, + signingType, }, ) => { const { buildCommand } = await import('./tasks/build'); @@ -185,7 +185,7 @@ export function runProgram(config: Config): void { keystorealias, keystorealiaspass, androidreleasetype, - signingtype, + signingtype: signingType, }); }, ), diff --git a/core/native-bridge.ts b/core/native-bridge.ts index 021b4523a..a33a15191 100644 --- a/core/native-bridge.ts +++ b/core/native-bridge.ts @@ -1065,6 +1065,7 @@ const initBridge = (w: any): void => { }); }; + // eslint-disable-next-line @typescript-eslint/no-unused-vars cap.withPlugin = (_pluginId, _fn) => dummy; cap.Exception = CapacitorException; diff --git a/ios/Capacitor/Capacitor/JS.swift b/ios/Capacitor/Capacitor/JS.swift index 79e98d18e..46972c48a 100644 --- a/ios/Capacitor/Capacitor/JS.swift +++ b/ios/Capacitor/Capacitor/JS.swift @@ -19,13 +19,6 @@ internal struct JSCall { let pluginId: String let method: String let callbackId: String - - init(options: [String: Any], pluginId: String, method: String, callbackId: String) { - self.options = options - self.pluginId = pluginId - self.method = method - self.callbackId = callbackId - } } internal protocol JSResultProtocol { @@ -64,11 +57,6 @@ internal struct JSResult: JSResultProtocol { let call: JSCall let result: PluginCallResult? - init(call: JSCall, result: PluginCallResult?) { - self.call = call - self.result = result - } - func jsonPayload() -> String { guard let result = result else { return SerializationResult.undefined.rawValue @@ -101,14 +89,6 @@ internal struct JSResultError: JSResultProtocol { let errorCode: String? let result: PluginCallResult - init(call: JSCall, errorMessage: String, errorDescription: String, errorCode: String?, result: PluginCallResult) { - self.call = call - self.errorMessage = errorMessage - self.errorDescription = errorDescription - self.errorCode = errorCode - self.result = result - } - func jsonPayload() -> String { var errorDictionary: [String: Any] = [ "message": self.errorMessage,