@capacitor/synapse
Advanced tools
+8
-0
@@ -0,1 +1,9 @@ | ||
| /** | ||
| * Example use: | ||
| * window.CapacitorUtils.Synapse.DemoPlugin.ping( | ||
| * {value: "hello"}, | ||
| * (val) => {console.log(val)}, | ||
| * (err) => {console.error(err)} | ||
| * ); | ||
| */ | ||
| export declare function exposeSynapse(): void; |
+1
-1
@@ -1,1 +0,1 @@ | ||
| "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function c(t){t.Outsystems.Synapse=new Proxy({},{get(s,e){return new Proxy({},{get(y,n){return(a,u,o)=>{const r=t.Capacitor.Plugins[e];if(r===void 0){o(new Error(`Capacitor plugin ${e} not found`));return}if(typeof r[n]!="function"){o(new Error(`Method ${n} not found in Capacitor plugin ${e}`));return}(async()=>{try{const i=await r[n](a);u(i)}catch(i){o(i)}})()}}})}})}function w(){window.Outsystems=window.Outsystems||{},window.Capacitor!==void 0?c(window):window.cordova!==void 0&&(window.Outsystems.Synapse=new Proxy({},{get(t,s){return window.cordova.plugins[s]}}))}exports.exposeSynapse=w; | ||
| "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; |
+1
-1
@@ -1,1 +0,1 @@ | ||
| (function(e,t){typeof exports=="object"&&typeof module<"u"?t(exports):typeof define=="function"&&define.amd?define(["exports"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e.outsystemsSynapse={}))})(this,function(e){"use strict";function t(n){n.Outsystems.Synapse=new Proxy({},{get(a,o){return new Proxy({},{get(p,i){return(c,f,s)=>{const r=n.Capacitor.Plugins[o];if(r===void 0){s(new Error(`Capacitor plugin ${o} not found`));return}if(typeof r[i]!="function"){s(new Error(`Method ${i} not found in Capacitor plugin ${o}`));return}(async()=>{try{const u=await r[i](c);f(u)}catch(u){s(u)}})()}}})}})}function d(){window.Outsystems=window.Outsystems||{},window.Capacitor!==void 0?t(window):window.cordova!==void 0&&(window.Outsystems.Synapse=new Proxy({},{get(n,a){return window.cordova.plugins[a]}}))}e.exposeSynapse=d,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}); | ||
| (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"})}); |
+22
-19
@@ -1,16 +0,16 @@ | ||
| function c(t) { | ||
| t.Outsystems.Synapse = new Proxy( | ||
| function s(t) { | ||
| t.CapacitorUtils.Synapse = new Proxy( | ||
| {}, | ||
| { | ||
| get(s, n) { | ||
| get(e, o) { | ||
| return new Proxy({}, { | ||
| get(w, o) { | ||
| return (a, u, r) => { | ||
| const e = t.Capacitor.Plugins[n]; | ||
| if (e === void 0) { | ||
| r(new Error(`Capacitor plugin ${n} not found`)); | ||
| 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 e[o] != "function") { | ||
| r(new Error(`Method ${o} not found in Capacitor plugin ${n}`)); | ||
| if (typeof i[r] != "function") { | ||
| n(new Error(`Method ${r} not found in Capacitor plugin ${o}`)); | ||
| return; | ||
@@ -20,6 +20,6 @@ } | ||
| try { | ||
| const i = await e[o](a); | ||
| u(i); | ||
| } catch (i) { | ||
| r(i); | ||
| const a = await i[r](c); | ||
| p(a); | ||
| } catch (a) { | ||
| n(a); | ||
| } | ||
@@ -34,14 +34,17 @@ })(); | ||
| } | ||
| function y() { | ||
| window.Outsystems = window.Outsystems || {}, window.Capacitor !== void 0 ? c(window) : window.cordova !== void 0 && (window.Outsystems.Synapse = new Proxy( | ||
| function u(t) { | ||
| t.CapacitorUtils.Synapse = new Proxy( | ||
| {}, | ||
| { | ||
| get(t, s) { | ||
| return window.cordova.plugins[s]; | ||
| get(e, o) { | ||
| return t.cordova.plugins[o]; | ||
| } | ||
| } | ||
| )); | ||
| ); | ||
| } | ||
| function y() { | ||
| window.CapacitorUtils = window.CapacitorUtils || {}, window.Capacitor !== void 0 ? s(window) : window.cordova !== void 0 && u(window); | ||
| } | ||
| export { | ||
| y as exposeSynapse | ||
| }; |
+1
-1
| { | ||
| "name": "@capacitor/synapse", | ||
| "version": "1.0.0", | ||
| "version": "1.0.1", | ||
| "main": "./dist/synapse.cjs", | ||
@@ -5,0 +5,0 @@ "module": "./dist/synapse.mjs", |
5727
5.1%64
20.75%