@capacitor/synapse
Advanced tools
+6
-1
| /** | ||
| * Expose CapacitorUtils.Synapse.<pluginName> | ||
| * | ||
| * By default it decides to use capacitor if is defined. | ||
| * If you want to instead use a cordova plugin in a capacitor shell, set overrideCapacitorWithCordova to true. | ||
| * | ||
| * Example use: | ||
@@ -9,2 +14,2 @@ * window.CapacitorUtils.Synapse.DemoPlugin.ping( | ||
| */ | ||
| export declare function exposeSynapse(): void; | ||
| export declare function exposeSynapse(overrideCapacitorWithCordova?: boolean): void; |
+1
-1
@@ -1,1 +0,1 @@ | ||
| "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function s(t){t.CapacitorUtils.Synapse=new Proxy({},{get(a,o){return new Proxy({},{get(w,r){return(c,p,n)=>{const i=t.Capacitor.Plugins[o];if(i===void 0){n(new Error(`Capacitor plugin ${o} not found`));return}if(typeof i[r]!="function"){n(new Error(`Method ${r} not found in Capacitor plugin ${o}`));return}(async()=>{try{const e=await i[r](c);p(e)}catch(e){n(e)}})()}}})}})}function u(t){t.CapacitorUtils.Synapse=new Proxy({},{get(a,o){return t.cordova.plugins[o]}})}function y(){window.CapacitorUtils=window.CapacitorUtils||{},window.Capacitor!==void 0?s(window):window.cordova!==void 0&&u(window)}exports.exposeSynapse=y; | ||
| "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function p(t){t.CapacitorUtils.Synapse=new Proxy({},{get(a,o){return new Proxy({},{get(w,r){return(c,s,n)=>{const e=t.Capacitor.Plugins[o];if(e===void 0){n(new Error(`Capacitor plugin ${o} not found`));return}if(typeof e[r]!="function"){n(new Error(`Method ${r} not found in Capacitor plugin ${o}`));return}(async()=>{try{const i=await e[r](c);s(i)}catch(i){n(i)}})()}}})}})}function u(t){t.CapacitorUtils.Synapse=new Proxy({},{get(a,o){return t.cordova.plugins[o]}})}function y(t=!1){window.CapacitorUtils=window.CapacitorUtils||{},window.Capacitor!==void 0&&!t?p(window):window.cordova!==void 0&&u(window)}exports.exposeSynapse=y; |
+1
-1
@@ -1,1 +0,1 @@ | ||
| (function(t,e){typeof exports=="object"&&typeof module<"u"?e(exports):typeof define=="function"&&define.amd?define(["exports"],e):(t=typeof globalThis<"u"?globalThis:t||self,e(t.outsystemsSynapse={}))})(this,function(t){"use strict";function e(n){n.CapacitorUtils.Synapse=new Proxy({},{get(u,o){return new Proxy({},{get(y,i){return(f,d,r)=>{const a=n.Capacitor.Plugins[o];if(a===void 0){r(new Error(`Capacitor plugin ${o} not found`));return}if(typeof a[i]!="function"){r(new Error(`Method ${i} not found in Capacitor plugin ${o}`));return}(async()=>{try{const s=await a[i](f);d(s)}catch(s){r(s)}})()}}})}})}function c(n){n.CapacitorUtils.Synapse=new Proxy({},{get(u,o){return n.cordova.plugins[o]}})}function p(){window.CapacitorUtils=window.CapacitorUtils||{},window.Capacitor!==void 0?e(window):window.cordova!==void 0&&c(window)}t.exposeSynapse=p,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})}); | ||
| (function(t,n){typeof exports=="object"&&typeof module<"u"?n(exports):typeof define=="function"&&define.amd?define(["exports"],n):(t=typeof globalThis<"u"?globalThis:t||self,n(t.outsystemsSynapse={}))})(this,function(t){"use strict";function n(e){e.CapacitorUtils.Synapse=new Proxy({},{get(u,o){return new Proxy({},{get(y,i){return(f,d,r)=>{const a=e.Capacitor.Plugins[o];if(a===void 0){r(new Error(`Capacitor plugin ${o} not found`));return}if(typeof a[i]!="function"){r(new Error(`Method ${i} not found in Capacitor plugin ${o}`));return}(async()=>{try{const s=await a[i](f);d(s)}catch(s){r(s)}})()}}})}})}function c(e){e.CapacitorUtils.Synapse=new Proxy({},{get(u,o){return e.cordova.plugins[o]}})}function p(e=!1){window.CapacitorUtils=window.CapacitorUtils||{},window.Capacitor!==void 0&&!e?n(window):window.cordova!==void 0&&c(window)}t.exposeSynapse=p,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})}); |
+2
-2
@@ -43,4 +43,4 @@ function s(t) { | ||
| } | ||
| function y() { | ||
| window.CapacitorUtils = window.CapacitorUtils || {}, window.Capacitor !== void 0 ? s(window) : window.cordova !== void 0 && u(window); | ||
| function y(t = !1) { | ||
| window.CapacitorUtils = window.CapacitorUtils || {}, window.Capacitor !== void 0 && !t ? s(window) : window.cordova !== void 0 && u(window); | ||
| } | ||
@@ -47,0 +47,0 @@ export { |
+1
-1
| { | ||
| "name": "@capacitor/synapse", | ||
| "version": "1.0.1", | ||
| "version": "1.0.2-dev.1", | ||
| "main": "./dist/synapse.cjs", | ||
@@ -5,0 +5,0 @@ "module": "./dist/synapse.mjs", |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
6019
5.1%69
7.81%4
33.33%1
Infinity%