@cap-kit/ssl-pinning 8.0.2 → 8.0.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.
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.cjs","sources":["esm/definitions.js","esm/index.js","esm/web.js"],"sourcesContent":["/// <reference types=\"@capacitor/cli\" />\n// -----------------------------------------------------------------------------\n// Enums\n// -----------------------------------------------------------------------------\n/**\n * Standardized error codes for programmatic handling of SSL pinning failures.\n *\n * Errors are delivered via Promise rejection as `CapacitorException`\n * with one of the following codes.\n *\n * @since 0.0.15\n */\nexport var SSLPinningErrorCode;\n(function (SSLPinningErrorCode) {\n /** Required data is missing or the feature is not available. */\n SSLPinningErrorCode[\"UNAVAILABLE\"] = \"UNAVAILABLE\";\n /** The user denied a required permission or the feature is disabled. */\n SSLPinningErrorCode[\"PERMISSION_DENIED\"] = \"PERMISSION_DENIED\";\n /** The SSL pinning operation failed due to a runtime or initialization error. */\n SSLPinningErrorCode[\"INIT_FAILED\"] = \"INIT_FAILED\";\n /** Invalid or unsupported input was provided. */\n SSLPinningErrorCode[\"UNKNOWN_TYPE\"] = \"UNKNOWN_TYPE\";\n})(SSLPinningErrorCode || (SSLPinningErrorCode = {}));\n//# sourceMappingURL=definitions.js.map","/**\n * Import the `registerPlugin` method from the Capacitor core library.\n * This method is used to register a custom plugin.\n */\nimport { registerPlugin } from '@capacitor/core';\n/**\n * The SSLPinning plugin instance.\n * It automatically lazy-loads the web implementation if running in a browser environment.\n * Use this instance to access all ssl pinning functionality.\n */\nconst SSLPinning = registerPlugin('SSLPinning', {\n web: () => import('./web').then((m) => new m.SSLPinningWeb()),\n});\nexport * from './definitions';\nexport { SSLPinning };\n//# sourceMappingURL=index.js.map","/**\n * This module provides a web implementation of the SSLPinningPlugin.\n * The functionality is limited in a web context due to the lack of SSL certificate inspection capabilities in browsers.\n *\n * The implementation adheres to the SSLPinningPlugin interface but provides fallback behavior\n * because browsers do not allow direct inspection of SSL certificate details.\n */\nimport { CapacitorException, ExceptionCode, WebPlugin } from '@capacitor/core';\n/**\n * Web implementation of the SSLPinning plugin.\n *\n * SSL certificate inspection is not supported in browsers,\n * therefore all SSL pinning methods are unimplemented.\n */\nexport class SSLPinningWeb extends WebPlugin {\n /**\n * Checks a single SSL certificate against the expected fingerprint.\n * @return A promise that resolves to the result of the certificate check.\n * @throws CapacitorException indicating unimplemented functionality.\n */\n async checkCertificate() {\n throw this.createUnimplementedError();\n }\n /**\n * Checks multiple SSL certificates against their expected fingerprints.\n * @return A promise that resolves to an array of results for each certificate check.\n * @throws CapacitorException indicating unimplemented functionality.\n */\n async checkCertificates() {\n throw this.createUnimplementedError();\n }\n // --- Plugin Info ---\n /**\n * Returns the plugin version.\n *\n * On the Web, this value represents the JavaScript package version\n * rather than a native implementation.\n */\n async getPluginVersion() {\n return { version: 'web' };\n }\n /**\n * Creates a standardized exception for unimplemented methods.\n *\n * This utility method centralizes the creation of exceptions for functionality that is not supported\n * on the current platform, ensuring consistency in error reporting.\n *\n * @returns {CapacitorException} An exception with the code `Unimplemented` and a descriptive message.\n */\n createUnimplementedError() {\n return new CapacitorException('This plugin method is not implemented on this platform.', ExceptionCode.Unimplemented);\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["SSLPinningErrorCode","registerPlugin","WebPlugin","CapacitorException","ExceptionCode"],"mappings":";;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACWA;AACX,CAAC,UAAU,mBAAmB,EAAE;AAChC;AACA,IAAI,mBAAmB,CAAC,aAAa,CAAC,GAAG,aAAa;AACtD;AACA,IAAI,mBAAmB,CAAC,mBAAmB,CAAC,GAAG,mBAAmB;AAClE;AACA,IAAI,mBAAmB,CAAC,aAAa,CAAC,GAAG,aAAa;AACtD;AACA,IAAI,mBAAmB,CAAC,cAAc,CAAC,GAAG,cAAc;AACxD,CAAC,EAAEA,2BAAmB,KAAKA,2BAAmB,GAAG,EAAE,CAAC,CAAC;;ACtBrD;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACK,MAAC,UAAU,GAAGC,mBAAc,CAAC,YAAY,EAAE;AAChD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,aAAa,EAAE,CAAC;AACjE,CAAC;;ACZD;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACO,MAAM,aAAa,SAASC,cAAS,CAAC;AAC7C;AACA;AACA;AACA;AACA;AACA,IAAI,MAAM,gBAAgB,GAAG;AAC7B,QAAQ,MAAM,IAAI,CAAC,wBAAwB,EAAE;AAC7C,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,IAAI,MAAM,iBAAiB,GAAG;AAC9B,QAAQ,MAAM,IAAI,CAAC,wBAAwB,EAAE;AAC7C,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,MAAM,gBAAgB,GAAG;AAC7B,QAAQ,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE;AACjC,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,wBAAwB,GAAG;AAC/B,QAAQ,OAAO,IAAIC,uBAAkB,CAAC,yDAAyD,EAAEC,kBAAa,CAAC,aAAa,CAAC;AAC7H,IAAI;AACJ;;;;;;;;;"}
|
|
@@ -10,7 +10,7 @@ import Foundation
|
|
|
10
10
|
public enum PluginVersion {
|
|
11
11
|
/**
|
|
12
12
|
The semantic version string of the plugin.
|
|
13
|
-
Value synchronized from package.json: "8.0.
|
|
13
|
+
Value synchronized from package.json: "8.0.3"
|
|
14
14
|
*/
|
|
15
|
-
public static let number = "8.0.
|
|
15
|
+
public static let number = "8.0.3"
|
|
16
16
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cap-kit/ssl-pinning",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.3",
|
|
4
4
|
"description": "Capacitor plugin for runtime SSL certificate fingerprint pinning on iOS and Android",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": false,
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"node": ">=24.0.0",
|
|
10
10
|
"pnpm": ">=10.0.0"
|
|
11
11
|
},
|
|
12
|
-
"main": "dist/plugin.cjs
|
|
12
|
+
"main": "dist/plugin.cjs",
|
|
13
13
|
"module": "dist/esm/index.js",
|
|
14
14
|
"types": "dist/esm/index.d.ts",
|
|
15
15
|
"unpkg": "dist/plugin.js",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
".": {
|
|
18
18
|
"types": "./dist/esm/index.d.ts",
|
|
19
19
|
"import": "./dist/esm/index.js",
|
|
20
|
-
"require": "./dist/plugin.cjs
|
|
20
|
+
"require": "./dist/plugin.cjs"
|
|
21
21
|
},
|
|
22
22
|
"./package.json": "./package.json"
|
|
23
23
|
},
|
package/dist/plugin.cjs.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.cjs.js","sources":["esm/definitions.js","esm/index.js","esm/web.js"],"sourcesContent":["/// <reference types=\"@capacitor/cli\" />\n// -----------------------------------------------------------------------------\n// Enums\n// -----------------------------------------------------------------------------\n/**\n * Standardized error codes for programmatic handling of SSL pinning failures.\n *\n * Errors are delivered via Promise rejection as `CapacitorException`\n * with one of the following codes.\n *\n * @since 0.0.15\n */\nexport var SSLPinningErrorCode;\n(function (SSLPinningErrorCode) {\n /** Required data is missing or the feature is not available. */\n SSLPinningErrorCode[\"UNAVAILABLE\"] = \"UNAVAILABLE\";\n /** The user denied a required permission or the feature is disabled. */\n SSLPinningErrorCode[\"PERMISSION_DENIED\"] = \"PERMISSION_DENIED\";\n /** The SSL pinning operation failed due to a runtime or initialization error. */\n SSLPinningErrorCode[\"INIT_FAILED\"] = \"INIT_FAILED\";\n /** Invalid or unsupported input was provided. */\n SSLPinningErrorCode[\"UNKNOWN_TYPE\"] = \"UNKNOWN_TYPE\";\n})(SSLPinningErrorCode || (SSLPinningErrorCode = {}));\n//# sourceMappingURL=definitions.js.map","/**\n * Import the `registerPlugin` method from the Capacitor core library.\n * This method is used to register a custom plugin.\n */\nimport { registerPlugin } from '@capacitor/core';\n/**\n * The SSLPinning plugin instance.\n * It automatically lazy-loads the web implementation if running in a browser environment.\n * Use this instance to access all ssl pinning functionality.\n */\nconst SSLPinning = registerPlugin('SSLPinning', {\n web: () => import('./web').then((m) => new m.SSLPinningWeb()),\n});\nexport * from './definitions';\nexport { SSLPinning };\n//# sourceMappingURL=index.js.map","/**\n * This module provides a web implementation of the SSLPinningPlugin.\n * The functionality is limited in a web context due to the lack of SSL certificate inspection capabilities in browsers.\n *\n * The implementation adheres to the SSLPinningPlugin interface but provides fallback behavior\n * because browsers do not allow direct inspection of SSL certificate details.\n */\nimport { CapacitorException, ExceptionCode, WebPlugin } from '@capacitor/core';\n/**\n * Web implementation of the SSLPinning plugin.\n *\n * SSL certificate inspection is not supported in browsers,\n * therefore all SSL pinning methods are unimplemented.\n */\nexport class SSLPinningWeb extends WebPlugin {\n /**\n * Checks a single SSL certificate against the expected fingerprint.\n * @return A promise that resolves to the result of the certificate check.\n * @throws CapacitorException indicating unimplemented functionality.\n */\n async checkCertificate() {\n throw this.createUnimplementedError();\n }\n /**\n * Checks multiple SSL certificates against their expected fingerprints.\n * @return A promise that resolves to an array of results for each certificate check.\n * @throws CapacitorException indicating unimplemented functionality.\n */\n async checkCertificates() {\n throw this.createUnimplementedError();\n }\n // --- Plugin Info ---\n /**\n * Returns the plugin version.\n *\n * On the Web, this value represents the JavaScript package version\n * rather than a native implementation.\n */\n async getPluginVersion() {\n return { version: 'web' };\n }\n /**\n * Creates a standardized exception for unimplemented methods.\n *\n * This utility method centralizes the creation of exceptions for functionality that is not supported\n * on the current platform, ensuring consistency in error reporting.\n *\n * @returns {CapacitorException} An exception with the code `Unimplemented` and a descriptive message.\n */\n createUnimplementedError() {\n return new CapacitorException('This plugin method is not implemented on this platform.', ExceptionCode.Unimplemented);\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["SSLPinningErrorCode","registerPlugin","WebPlugin","CapacitorException","ExceptionCode"],"mappings":";;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACWA;AACX,CAAC,UAAU,mBAAmB,EAAE;AAChC;AACA,IAAI,mBAAmB,CAAC,aAAa,CAAC,GAAG,aAAa;AACtD;AACA,IAAI,mBAAmB,CAAC,mBAAmB,CAAC,GAAG,mBAAmB;AAClE;AACA,IAAI,mBAAmB,CAAC,aAAa,CAAC,GAAG,aAAa;AACtD;AACA,IAAI,mBAAmB,CAAC,cAAc,CAAC,GAAG,cAAc;AACxD,CAAC,EAAEA,2BAAmB,KAAKA,2BAAmB,GAAG,EAAE,CAAC,CAAC;;ACtBrD;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACK,MAAC,UAAU,GAAGC,mBAAc,CAAC,YAAY,EAAE;AAChD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,aAAa,EAAE,CAAC;AACjE,CAAC;;ACZD;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACO,MAAM,aAAa,SAASC,cAAS,CAAC;AAC7C;AACA;AACA;AACA;AACA;AACA,IAAI,MAAM,gBAAgB,GAAG;AAC7B,QAAQ,MAAM,IAAI,CAAC,wBAAwB,EAAE;AAC7C,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,IAAI,MAAM,iBAAiB,GAAG;AAC9B,QAAQ,MAAM,IAAI,CAAC,wBAAwB,EAAE;AAC7C,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,MAAM,gBAAgB,GAAG;AAC7B,QAAQ,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE;AACjC,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,wBAAwB,GAAG;AAC/B,QAAQ,OAAO,IAAIC,uBAAkB,CAAC,yDAAyD,EAAEC,kBAAa,CAAC,aAAa,CAAC;AAC7H,IAAI;AACJ;;;;;;;;;"}
|