From 96b339f2e4bc44fbb05a911dd83d45700bb59035 Mon Sep 17 00:00:00 2001 From: Dylan Aird Date: Wed, 22 Nov 2023 21:33:09 +1100 Subject: [PATCH 1/7] - Add capability to pass up optional parameters note and locationId. - Cleaned up handling of failed transaction to make parsing the data cleaner. --- .../capacitor/square/CapacitorSquare.java | 12 +++++++++- .../square/CapacitorSquarePlugin.java | 22 ++++++++++++++----- ios/Plugin/CapacitorSquarePlugin.swift | 15 +++++++++++-- 3 files changed, 41 insertions(+), 8 deletions(-) diff --git a/android/src/main/java/com/proteansoftware/capacitor/square/CapacitorSquare.java b/android/src/main/java/com/proteansoftware/capacitor/square/CapacitorSquare.java index d53466a..1d951b0 100644 --- a/android/src/main/java/com/proteansoftware/capacitor/square/CapacitorSquare.java +++ b/android/src/main/java/com/proteansoftware/capacitor/square/CapacitorSquare.java @@ -57,13 +57,23 @@ public Intent createChargeIntent( Integer totalAmount, CurrencyCode currencyCode, ArrayList restrictPaymentMethods, - @Nullable Integer autoReturnTimeout) { + @Nullable Integer autoReturnTimeout, + @Nullable String locationId, + @Nullable String note) { ChargeRequest.Builder request = new ChargeRequest.Builder(totalAmount, currencyCode); if (!restrictPaymentMethods.isEmpty()) { request.restrictTendersTo(restrictPaymentMethods); } + if(locationId != null) { + request.enforceBusinessLocation(locationId); + } + + if(note != null) { + request.note(note); + } + if (autoReturnTimeout != null) { request.autoReturn(autoReturnTimeout, autoReturnTimeout.equals(PosApi.AUTO_RETURN_NO_TIMEOUT) ? null : TimeUnit.MILLISECONDS); } diff --git a/android/src/main/java/com/proteansoftware/capacitor/square/CapacitorSquarePlugin.java b/android/src/main/java/com/proteansoftware/capacitor/square/CapacitorSquarePlugin.java index 3966d18..c5d9429 100644 --- a/android/src/main/java/com/proteansoftware/capacitor/square/CapacitorSquarePlugin.java +++ b/android/src/main/java/com/proteansoftware/capacitor/square/CapacitorSquarePlugin.java @@ -68,6 +68,12 @@ public void startTransaction(PluginCall call) { return; } + String note = call.getString("note"); + if (note != null && note.length() >= 500) { + call.reject("Note is too long."); + return; + } + CurrencyCode currencyCode = implementation.parseCurrencyCode(currencyCodeString); if (currencyCode == null) { call.reject("currencyCode '" + currencyCodeString + "' is invalid"); @@ -111,12 +117,16 @@ public void startTransaction(PluginCall call) { return; } + String locationId = call.getString("locationId"); + try { Intent intent = implementation.createChargeIntent( totalAmount, currencyCode, restrictPaymentMethods, - autoReturnTimeout); + autoReturnTimeout, + locationId, + note); startActivityForResult(call, intent, "chargeRequest"); } catch (ActivityNotFoundException e) { implementation.openPointOfSalePlayStoreListing(); @@ -133,7 +143,8 @@ protected void chargeRequest(PluginCall call, ActivityResult result) { JSObject errorObject = new JSObject(); try { if (call == null) { - errorObject.put("error", "could not retrieve saved call"); + errorObject.put("error", "NO_SAVED_CALL"); + errorObject.put("errorDebugDescription", "could not retrieve saved call"); notifyListeners("transactionFailed", errorObject); return; } @@ -153,13 +164,14 @@ protected void chargeRequest(PluginCall call, ActivityResult result) { // Handle expected errors Intent data = result.getData(); ChargeRequest.Error error = implementation.parseChargeError(data); - String errorMessage = "Error" + error.code + "\nclientTransactionId" + error.debugDescription; - errorObject.put("error", errorMessage); + errorObject.put("error", error.code); + errorObject.put("errorDebugDescription", error.debugDescription); notifyListeners("transactionFailed", errorObject); call.resolve(); } } catch (Exception e) { - errorObject.put("error", e.getMessage()); + errorObject.put("error", "EXCEPTION_ERROR"); + errorObject.put("errorDebugDescription", e.getMessage()); notifyListeners("transactionFailed", errorObject); call.resolve(); } diff --git a/ios/Plugin/CapacitorSquarePlugin.swift b/ios/Plugin/CapacitorSquarePlugin.swift index 3dd1f1c..14af1d3 100644 --- a/ios/Plugin/CapacitorSquarePlugin.swift +++ b/ios/Plugin/CapacitorSquarePlugin.swift @@ -44,6 +44,17 @@ public class CapacitorSquarePlugin: CAPPlugin { return; } + //add optional location id + let locationID = call.getString("locationId") ?? nil; + + // handle a note + let note = call.getString("note") ?? nil; + if(note != nil && note.count >= 500) { + call.reject("Note is too long"); + return; + } + + let yourCallbackURL = URL(string: callbackUrl)! // Specify the amount of money to charge. @@ -86,8 +97,8 @@ public class CapacitorSquarePlugin: CAPPlugin { request = try SCCAPIRequest(callbackURL: yourCallbackURL, amount: amount, userInfoString: nil, - locationID: nil, - notes: nil, + locationID: locationId, + notes: note, customerID: nil, supportedTenderTypes: supportedTenderTypes, clearsDefaultFees: false, From 218441a57c6d6d6d8699edd454760a52002c5a84 Mon Sep 17 00:00:00 2001 From: Dylan Aird Date: Mon, 27 Nov 2023 12:41:20 +1100 Subject: [PATCH 2/7] push dist folder --- .gitignore | 2 +- dist/docs.json | 153 ++++++++++++++++++++++++++++++++++++ dist/esm/definitions.d.ts | 59 ++++++++++++++ dist/esm/definitions.js | 20 +++++ dist/esm/definitions.js.map | 1 + dist/esm/index.d.ts | 4 + dist/esm/index.js | 7 ++ dist/esm/index.js.map | 1 + dist/esm/web.d.ts | 19 +++++ dist/esm/web.js | 13 +++ dist/esm/web.js.map | 1 + dist/plugin.cjs.js | 48 +++++++++++ dist/plugin.cjs.js.map | 1 + dist/plugin.js | 51 ++++++++++++ dist/plugin.js.map | 1 + 15 files changed, 380 insertions(+), 1 deletion(-) create mode 100644 dist/docs.json create mode 100644 dist/esm/definitions.d.ts create mode 100644 dist/esm/definitions.js create mode 100644 dist/esm/definitions.js.map create mode 100644 dist/esm/index.d.ts create mode 100644 dist/esm/index.js create mode 100644 dist/esm/index.js.map create mode 100644 dist/esm/web.d.ts create mode 100644 dist/esm/web.js create mode 100644 dist/esm/web.js.map create mode 100644 dist/plugin.cjs.js create mode 100644 dist/plugin.cjs.js.map create mode 100644 dist/plugin.js create mode 100644 dist/plugin.js.map diff --git a/.gitignore b/.gitignore index 70ccbf7..f209717 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ # node files -dist +# dist node_modules # iOS files diff --git a/dist/docs.json b/dist/docs.json new file mode 100644 index 0000000..fc70cc5 --- /dev/null +++ b/dist/docs.json @@ -0,0 +1,153 @@ +{ + "api": { + "name": "CapacitorSquarePlugin", + "slug": "capacitorsquareplugin", + "docs": "", + "tags": [], + "methods": [ + { + "name": "initApp", + "signature": "(options: { applicationId: string; }) => any", + "parameters": [ + { + "name": "options", + "docs": "", + "type": "{ applicationId: string; }" + } + ], + "returns": "any", + "tags": [], + "docs": "", + "complexTypes": [], + "slug": "initapp" + }, + { + "name": "startTransaction", + "signature": "(options: { totalAmount: number; currencyCode: string; allowedPaymentMethods?: string[] | null; autoReturnTimeout?: number | AutoReturn.NoTimeout | null; callbackUrl?: string | null; }) => any", + "parameters": [ + { + "name": "options", + "docs": "", + "type": "{ totalAmount: number; currencyCode: string; allowedPaymentMethods?: {} | null | undefined; autoReturnTimeout?: number | null | undefined; callbackUrl?: string | null | undefined; }" + } + ], + "returns": "any", + "tags": [], + "docs": "", + "complexTypes": [ + "AutoReturn" + ], + "slug": "starttransaction" + }, + { + "name": "handleIosResponse", + "signature": "(options: { url: string; }) => any", + "parameters": [ + { + "name": "options", + "docs": "", + "type": "{ url: string; }" + } + ], + "returns": "any", + "tags": [], + "docs": "", + "complexTypes": [], + "slug": "handleiosresponse" + }, + { + "name": "addListener", + "signature": "(eventName: 'transactionComplete', listenerFunc: TransactionCompletedListener) => Promise & PluginListenerHandle", + "parameters": [ + { + "name": "eventName", + "docs": "", + "type": "\"transactionComplete\"" + }, + { + "name": "listenerFunc", + "docs": "", + "type": "(callback: { clientTransactionId: string; serverTransactionId: string; }) => void" + } + ], + "returns": "any", + "tags": [], + "docs": "", + "complexTypes": [ + "TransactionCompletedListener", + "PluginListenerHandle" + ], + "slug": "addlistener" + }, + { + "name": "addListener", + "signature": "(eventName: 'transactionFailed', listenerFunc: TransactionFailedListener) => Promise & PluginListenerHandle", + "parameters": [ + { + "name": "eventName", + "docs": "", + "type": "\"transactionFailed\"" + }, + { + "name": "listenerFunc", + "docs": "", + "type": "(callback: { error: any; }) => void" + } + ], + "returns": "any", + "tags": [], + "docs": "", + "complexTypes": [ + "TransactionFailedListener", + "PluginListenerHandle" + ], + "slug": "addlistener" + } + ], + "properties": [] + }, + "interfaces": [ + { + "name": "PluginListenerHandle", + "slug": "pluginlistenerhandle", + "docs": "", + "tags": [], + "methods": [], + "properties": [ + { + "name": "remove", + "tags": [], + "docs": "", + "complexTypes": [], + "type": "() => any" + } + ] + } + ], + "enums": [ + { + "name": "AutoReturn", + "slug": "autoreturn", + "members": [ + { + "name": "NoTimeout", + "value": "0", + "tags": [], + "docs": "No timeout" + }, + { + "name": "Min", + "value": "3200", + "tags": [], + "docs": "Minimum timeout value (3200 milliseconds)" + }, + { + "name": "Max", + "value": "10000", + "tags": [], + "docs": "Maximum timeout value (10000 milliseconds)" + } + ] + } + ] +} \ No newline at end of file diff --git a/dist/esm/definitions.d.ts b/dist/esm/definitions.d.ts new file mode 100644 index 0000000..cc96f34 --- /dev/null +++ b/dist/esm/definitions.d.ts @@ -0,0 +1,59 @@ +import { PluginListenerHandle } from "@capacitor/core"; +export declare type TransactionCompletedListener = (callback: { + clientTransactionId: string; + serverTransactionId: string; +}) => void; +export declare type TransactionFailedListener = (callback: { + error: any; +}) => void; +/** + * AutoReturn timeout values + */ +export declare enum AutoReturn { + /** + * No timeout + */ + NoTimeout = 0, + /** + * Minimum timeout value (3200 milliseconds) + */ + Min = 3200, + /** + * Maximum timeout value (10000 milliseconds) + */ + Max = 10000 +} +export interface CapacitorSquarePlugin { + initApp(options: { + applicationId: string; + }): Promise<{ + message: string; + }>; + startTransaction(options: { + /** + * amount in pennies/cents + */ + totalAmount: number; + /** + * // ISO currency code, must be support by square + */ + currencyCode: string; + /** + * Sqaure TendType: https://developer.squareup.com/docs/api/point-of-sale/android/com/squareup/sdk/pos/ChargeRequest.TenderType.html + */ + allowedPaymentMethods?: string[] | null; + /** + * The timeout to set in milliseconds, or AutoReturn.NoTimeout. If you specify a timeout, it must be between 3200 milliseconds and 10000 milliseconds. + */ + autoReturnTimeout?: number | AutoReturn.NoTimeout | null; + /** + * see iOS setup + */ + callbackUrl?: string | null; + }): Promise; + handleIosResponse(options: { + url: string; + }): Promise; + addListener(eventName: 'transactionComplete', listenerFunc: TransactionCompletedListener): Promise & PluginListenerHandle; + addListener(eventName: 'transactionFailed', listenerFunc: TransactionFailedListener): Promise & PluginListenerHandle; +} diff --git a/dist/esm/definitions.js b/dist/esm/definitions.js new file mode 100644 index 0000000..edaa73d --- /dev/null +++ b/dist/esm/definitions.js @@ -0,0 +1,20 @@ +/** + * AutoReturn timeout values + */ +export var AutoReturn; +(function (AutoReturn) { + /** + * No timeout + */ + AutoReturn[AutoReturn["NoTimeout"] = 0] = "NoTimeout"; + /** + * Minimum timeout value (3200 milliseconds) + */ + AutoReturn[AutoReturn["Min"] = 3200] = "Min"; + /** + * Maximum timeout value (10000 milliseconds) + */ + AutoReturn[AutoReturn["Max"] = 10000] = "Max"; +})(AutoReturn || (AutoReturn = {})); +; +//# sourceMappingURL=definitions.js.map \ No newline at end of file diff --git a/dist/esm/definitions.js.map b/dist/esm/definitions.js.map new file mode 100644 index 0000000..6220068 --- /dev/null +++ b/dist/esm/definitions.js.map @@ -0,0 +1 @@ +{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"AASA;;GAEG;AACH,MAAM,CAAN,IAAY,UAaX;AAbD,WAAY,UAAU;IACpB;;OAEG;IACH,qDAAa,CAAA;IACb;;OAEG;IACH,4CAAU,CAAA;IACV;;OAEG;IACH,6CAAW,CAAA;AACb,CAAC,EAbW,UAAU,KAAV,UAAU,QAarB;AAAA,CAAC"} \ No newline at end of file diff --git a/dist/esm/index.d.ts b/dist/esm/index.d.ts new file mode 100644 index 0000000..976f3a6 --- /dev/null +++ b/dist/esm/index.d.ts @@ -0,0 +1,4 @@ +import type { CapacitorSquarePlugin } from './definitions'; +declare const CapacitorSquare: CapacitorSquarePlugin; +export * from './definitions'; +export { CapacitorSquare }; diff --git a/dist/esm/index.js b/dist/esm/index.js new file mode 100644 index 0000000..902f918 --- /dev/null +++ b/dist/esm/index.js @@ -0,0 +1,7 @@ +import { registerPlugin } from '@capacitor/core'; +const CapacitorSquare = registerPlugin('CapacitorSquare', { + web: () => import('./web').then(m => new m.CapacitorSquareWeb()), +}); +export * from './definitions'; +export { CapacitorSquare }; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/esm/index.js.map b/dist/esm/index.js.map new file mode 100644 index 0000000..a67c5b8 --- /dev/null +++ b/dist/esm/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIjD,MAAM,eAAe,GAAG,cAAc,CAAwB,iBAAiB,EAAE;IAC/E,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,kBAAkB,EAAE,CAAC;CACjE,CAAC,CAAC;AAEH,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,eAAe,EAAE,CAAC"} \ No newline at end of file diff --git a/dist/esm/web.d.ts b/dist/esm/web.d.ts new file mode 100644 index 0000000..6c1906d --- /dev/null +++ b/dist/esm/web.d.ts @@ -0,0 +1,19 @@ +import { WebPlugin } from '@capacitor/core'; +import type { AutoReturn, CapacitorSquarePlugin } from './definitions'; +export declare class CapacitorSquareWeb extends WebPlugin implements CapacitorSquarePlugin { + initApp(_options: { + applicationId: string; + }): Promise<{ + message: string; + }>; + startTransaction(_options: { + totalAmount: number; + currencyCode: string; + allowedPaymentMethods?: string[] | null; + autoReturnTimeout?: number | AutoReturn.NoTimeout | null; + callbackUrl?: string | null; + }): Promise; + handleIosResponse(_options: { + url: string; + }): Promise; +} diff --git a/dist/esm/web.js b/dist/esm/web.js new file mode 100644 index 0000000..72d4c96 --- /dev/null +++ b/dist/esm/web.js @@ -0,0 +1,13 @@ +import { WebPlugin } from '@capacitor/core'; +export class CapacitorSquareWeb extends WebPlugin { + async initApp(_options) { + throw new Error("Method not implemented."); + } + async startTransaction(_options) { + throw new Error("Method not implemented."); + } + async handleIosResponse(_options) { + throw new Error("Method not implemented."); + } +} +//# sourceMappingURL=web.js.map \ No newline at end of file diff --git a/dist/esm/web.js.map b/dist/esm/web.js.map new file mode 100644 index 0000000..db19875 --- /dev/null +++ b/dist/esm/web.js.map @@ -0,0 +1 @@ +{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,MAAM,OAAO,kBAAmB,SAAQ,SAAS;IAC/C,KAAK,CAAC,OAAO,CAAC,QAAoC;QAChD,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IAED,KAAK,CAAC,gBAAgB,CAAC,QAMtB;QACC,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IAED,KAAK,CAAC,iBAAiB,CAAC,QAA0B;QAChD,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;CACF"} \ No newline at end of file diff --git a/dist/plugin.cjs.js b/dist/plugin.cjs.js new file mode 100644 index 0000000..5e509a3 --- /dev/null +++ b/dist/plugin.cjs.js @@ -0,0 +1,48 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +var core = require('@capacitor/core'); + +/** + * AutoReturn timeout values + */ +exports.AutoReturn = void 0; +(function (AutoReturn) { + /** + * No timeout + */ + AutoReturn[AutoReturn["NoTimeout"] = 0] = "NoTimeout"; + /** + * Minimum timeout value (3200 milliseconds) + */ + AutoReturn[AutoReturn["Min"] = 3200] = "Min"; + /** + * Maximum timeout value (10000 milliseconds) + */ + AutoReturn[AutoReturn["Max"] = 10000] = "Max"; +})(exports.AutoReturn || (exports.AutoReturn = {})); + +const CapacitorSquare = core.registerPlugin('CapacitorSquare', { + web: () => Promise.resolve().then(function () { return web; }).then(m => new m.CapacitorSquareWeb()), +}); + +class CapacitorSquareWeb extends core.WebPlugin { + async initApp(_options) { + throw new Error("Method not implemented."); + } + async startTransaction(_options) { + throw new Error("Method not implemented."); + } + async handleIosResponse(_options) { + throw new Error("Method not implemented."); + } +} + +var web = /*#__PURE__*/Object.freeze({ + __proto__: null, + CapacitorSquareWeb: CapacitorSquareWeb +}); + +exports.CapacitorSquare = CapacitorSquare; +//# sourceMappingURL=plugin.cjs.js.map diff --git a/dist/plugin.cjs.js.map b/dist/plugin.cjs.js.map new file mode 100644 index 0000000..d6f069b --- /dev/null +++ b/dist/plugin.cjs.js.map @@ -0,0 +1 @@ +{"version":3,"file":"plugin.cjs.js","sources":["esm/definitions.js","esm/index.js","esm/web.js"],"sourcesContent":["/**\n * AutoReturn timeout values\n */\nexport var AutoReturn;\n(function (AutoReturn) {\n /**\n * No timeout\n */\n AutoReturn[AutoReturn[\"NoTimeout\"] = 0] = \"NoTimeout\";\n /**\n * Minimum timeout value (3200 milliseconds)\n */\n AutoReturn[AutoReturn[\"Min\"] = 3200] = \"Min\";\n /**\n * Maximum timeout value (10000 milliseconds)\n */\n AutoReturn[AutoReturn[\"Max\"] = 10000] = \"Max\";\n})(AutoReturn || (AutoReturn = {}));\n;\n//# sourceMappingURL=definitions.js.map","import { registerPlugin } from '@capacitor/core';\nconst CapacitorSquare = registerPlugin('CapacitorSquare', {\n web: () => import('./web').then(m => new m.CapacitorSquareWeb()),\n});\nexport * from './definitions';\nexport { CapacitorSquare };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class CapacitorSquareWeb extends WebPlugin {\n async initApp(_options) {\n throw new Error(\"Method not implemented.\");\n }\n async startTransaction(_options) {\n throw new Error(\"Method not implemented.\");\n }\n async handleIosResponse(_options) {\n throw new Error(\"Method not implemented.\");\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["AutoReturn","registerPlugin","WebPlugin"],"mappings":";;;;;;AAAA;AACA;AACA;AACWA,4BAAW;AACtB,CAAC,UAAU,UAAU,EAAE;AACvB;AACA;AACA;AACA,IAAI,UAAU,CAAC,UAAU,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,GAAG,WAAW,CAAC;AAC1D;AACA;AACA;AACA,IAAI,UAAU,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,GAAG,KAAK,CAAC;AACjD;AACA;AACA;AACA,IAAI,UAAU,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,KAAK,CAAC;AAClD,CAAC,EAAEA,kBAAU,KAAKA,kBAAU,GAAG,EAAE,CAAC,CAAC;;AChB9B,MAAC,eAAe,GAAGC,mBAAc,CAAC,iBAAiB,EAAE;AAC1D,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,kBAAkB,EAAE,CAAC;AACpE,CAAC;;ACFM,MAAM,kBAAkB,SAASC,cAAS,CAAC;AAClD,IAAI,MAAM,OAAO,CAAC,QAAQ,EAAE;AAC5B,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;AACnD,KAAK;AACL,IAAI,MAAM,gBAAgB,CAAC,QAAQ,EAAE;AACrC,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;AACnD,KAAK;AACL,IAAI,MAAM,iBAAiB,CAAC,QAAQ,EAAE;AACtC,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;AACnD,KAAK;AACL;;;;;;;;;"} \ No newline at end of file diff --git a/dist/plugin.js b/dist/plugin.js new file mode 100644 index 0000000..ea9b257 --- /dev/null +++ b/dist/plugin.js @@ -0,0 +1,51 @@ +var capacitorCapacitorSquare = (function (exports, core) { + 'use strict'; + + /** + * AutoReturn timeout values + */ + exports.AutoReturn = void 0; + (function (AutoReturn) { + /** + * No timeout + */ + AutoReturn[AutoReturn["NoTimeout"] = 0] = "NoTimeout"; + /** + * Minimum timeout value (3200 milliseconds) + */ + AutoReturn[AutoReturn["Min"] = 3200] = "Min"; + /** + * Maximum timeout value (10000 milliseconds) + */ + AutoReturn[AutoReturn["Max"] = 10000] = "Max"; + })(exports.AutoReturn || (exports.AutoReturn = {})); + + const CapacitorSquare = core.registerPlugin('CapacitorSquare', { + web: () => Promise.resolve().then(function () { return web; }).then(m => new m.CapacitorSquareWeb()), + }); + + class CapacitorSquareWeb extends core.WebPlugin { + async initApp(_options) { + throw new Error("Method not implemented."); + } + async startTransaction(_options) { + throw new Error("Method not implemented."); + } + async handleIosResponse(_options) { + throw new Error("Method not implemented."); + } + } + + var web = /*#__PURE__*/Object.freeze({ + __proto__: null, + CapacitorSquareWeb: CapacitorSquareWeb + }); + + exports.CapacitorSquare = CapacitorSquare; + + Object.defineProperty(exports, '__esModule', { value: true }); + + return exports; + +}({}, capacitorExports)); +//# sourceMappingURL=plugin.js.map diff --git a/dist/plugin.js.map b/dist/plugin.js.map new file mode 100644 index 0000000..0ed7d58 --- /dev/null +++ b/dist/plugin.js.map @@ -0,0 +1 @@ +{"version":3,"file":"plugin.js","sources":["esm/definitions.js","esm/index.js","esm/web.js"],"sourcesContent":["/**\n * AutoReturn timeout values\n */\nexport var AutoReturn;\n(function (AutoReturn) {\n /**\n * No timeout\n */\n AutoReturn[AutoReturn[\"NoTimeout\"] = 0] = \"NoTimeout\";\n /**\n * Minimum timeout value (3200 milliseconds)\n */\n AutoReturn[AutoReturn[\"Min\"] = 3200] = \"Min\";\n /**\n * Maximum timeout value (10000 milliseconds)\n */\n AutoReturn[AutoReturn[\"Max\"] = 10000] = \"Max\";\n})(AutoReturn || (AutoReturn = {}));\n;\n//# sourceMappingURL=definitions.js.map","import { registerPlugin } from '@capacitor/core';\nconst CapacitorSquare = registerPlugin('CapacitorSquare', {\n web: () => import('./web').then(m => new m.CapacitorSquareWeb()),\n});\nexport * from './definitions';\nexport { CapacitorSquare };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class CapacitorSquareWeb extends WebPlugin {\n async initApp(_options) {\n throw new Error(\"Method not implemented.\");\n }\n async startTransaction(_options) {\n throw new Error(\"Method not implemented.\");\n }\n async handleIosResponse(_options) {\n throw new Error(\"Method not implemented.\");\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["AutoReturn","registerPlugin","WebPlugin"],"mappings":";;;IAAA;IACA;IACA;AACWA,gCAAW;IACtB,CAAC,UAAU,UAAU,EAAE;IACvB;IACA;IACA;IACA,IAAI,UAAU,CAAC,UAAU,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,GAAG,WAAW,CAAC;IAC1D;IACA;IACA;IACA,IAAI,UAAU,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,GAAG,KAAK,CAAC;IACjD;IACA;IACA;IACA,IAAI,UAAU,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,KAAK,CAAC;IAClD,CAAC,EAAEA,kBAAU,KAAKA,kBAAU,GAAG,EAAE,CAAC,CAAC;;AChB9B,UAAC,eAAe,GAAGC,mBAAc,CAAC,iBAAiB,EAAE;IAC1D,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,kBAAkB,EAAE,CAAC;IACpE,CAAC;;ICFM,MAAM,kBAAkB,SAASC,cAAS,CAAC;IAClD,IAAI,MAAM,OAAO,CAAC,QAAQ,EAAE;IAC5B,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IACnD,KAAK;IACL,IAAI,MAAM,gBAAgB,CAAC,QAAQ,EAAE;IACrC,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IACnD,KAAK;IACL,IAAI,MAAM,iBAAiB,CAAC,QAAQ,EAAE;IACtC,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IACnD,KAAK;IACL;;;;;;;;;;;;;;;;;"} \ No newline at end of file From 7c503c6b84d59473a136a4c775c27b1eedba52b5 Mon Sep 17 00:00:00 2001 From: Dylan Aird Date: Mon, 27 Nov 2023 13:04:50 +1100 Subject: [PATCH 3/7] update error handling. --- .../capacitor/square/CapacitorSquarePlugin.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/android/src/main/java/com/proteansoftware/capacitor/square/CapacitorSquarePlugin.java b/android/src/main/java/com/proteansoftware/capacitor/square/CapacitorSquarePlugin.java index c5d9429..aba62a7 100644 --- a/android/src/main/java/com/proteansoftware/capacitor/square/CapacitorSquarePlugin.java +++ b/android/src/main/java/com/proteansoftware/capacitor/square/CapacitorSquarePlugin.java @@ -143,7 +143,8 @@ protected void chargeRequest(PluginCall call, ActivityResult result) { JSObject errorObject = new JSObject(); try { if (call == null) { - errorObject.put("error", "NO_SAVED_CALL"); + errorObject.put("status", "error"); + errorObject.put("error_code", "NO_SAVED_CALL"); errorObject.put("errorDebugDescription", "could not retrieve saved call"); notifyListeners("transactionFailed", errorObject); return; @@ -155,7 +156,7 @@ protected void chargeRequest(PluginCall call, ActivityResult result) { Intent data = result.getData(); ChargeRequest.Success success = implementation.parseChargeSuccess(data); JSObject resultData = new JSObject(); - resultData.put("message", "Success"); + resultData.put("status", "ok"); resultData.put("clientTransactionId", success.clientTransactionId); resultData.put("serverTransactionId", success.serverTransactionId); notifyListeners("transactionComplete", resultData); @@ -164,13 +165,15 @@ protected void chargeRequest(PluginCall call, ActivityResult result) { // Handle expected errors Intent data = result.getData(); ChargeRequest.Error error = implementation.parseChargeError(data); - errorObject.put("error", error.code); + errorObject.put("status", "error"); + errorObject.put("error_code", error.code); errorObject.put("errorDebugDescription", error.debugDescription); notifyListeners("transactionFailed", errorObject); call.resolve(); } } catch (Exception e) { - errorObject.put("error", "EXCEPTION_ERROR"); + errorObject.put("status", "error"); + errorObject.put("error_code", "EXCEPTION_ERROR"); errorObject.put("errorDebugDescription", e.getMessage()); notifyListeners("transactionFailed", errorObject); call.resolve(); From 3a343a018d6ddea3917bdd7b2312cf56779ace5e Mon Sep 17 00:00:00 2001 From: Dylan Aird Date: Mon, 27 Nov 2023 13:43:16 +1100 Subject: [PATCH 4/7] fix arguments that are broken. --- ios/Plugin/CapacitorSquarePlugin.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ios/Plugin/CapacitorSquarePlugin.swift b/ios/Plugin/CapacitorSquarePlugin.swift index 14af1d3..af0af03 100644 --- a/ios/Plugin/CapacitorSquarePlugin.swift +++ b/ios/Plugin/CapacitorSquarePlugin.swift @@ -45,11 +45,11 @@ public class CapacitorSquarePlugin: CAPPlugin { } //add optional location id - let locationID = call.getString("locationId") ?? nil; + let locationId = call.getString("locationId") ?? nil; // handle a note - let note = call.getString("note") ?? nil; - if(note != nil && note.count >= 500) { + let note = call.getString("note") ?? ""; + if(note.count >= 500) { call.reject("Note is too long"); return; } From 672446564e55e2fc11bef23582cd49729d87e7ac Mon Sep 17 00:00:00 2001 From: Dylan Aird Date: Wed, 29 Nov 2023 09:17:30 +1100 Subject: [PATCH 5/7] Remove dist folder and change ownership. --- .gitignore | 2 +- README.md | 19 ++--- dist/docs.json | 153 ------------------------------------ dist/esm/definitions.d.ts | 59 -------------- dist/esm/definitions.js | 20 ----- dist/esm/definitions.js.map | 1 - dist/esm/index.d.ts | 4 - dist/esm/index.js | 7 -- dist/esm/index.js.map | 1 - dist/esm/web.d.ts | 19 ----- dist/esm/web.js | 13 --- dist/esm/web.js.map | 1 - dist/plugin.cjs.js | 48 ----------- dist/plugin.cjs.js.map | 1 - dist/plugin.js | 51 ------------ dist/plugin.js.map | 1 - package.json | 19 +++-- 17 files changed, 20 insertions(+), 399 deletions(-) delete mode 100644 dist/docs.json delete mode 100644 dist/esm/definitions.d.ts delete mode 100644 dist/esm/definitions.js delete mode 100644 dist/esm/definitions.js.map delete mode 100644 dist/esm/index.d.ts delete mode 100644 dist/esm/index.js delete mode 100644 dist/esm/index.js.map delete mode 100644 dist/esm/web.d.ts delete mode 100644 dist/esm/web.js delete mode 100644 dist/esm/web.js.map delete mode 100644 dist/plugin.cjs.js delete mode 100644 dist/plugin.cjs.js.map delete mode 100644 dist/plugin.js delete mode 100644 dist/plugin.js.map diff --git a/.gitignore b/.gitignore index f209717..70ccbf7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ # node files -# dist +dist node_modules # iOS files diff --git a/README.md b/README.md index 597af1a..ad3a310 100644 --- a/README.md +++ b/README.md @@ -1,23 +1,16 @@ -# @proteansoftware/capacitor-square +# @dolaned/capacitor-square Integrate with Square Payments SDK | Package Version | Capacitor Version | |-----------------|-------------------| -| 4.X | 4.X | -| 3.X | 3.X | +| 1.X | 5.X | ## Install -Version 4.X is compatible with Capacitor 4.X +Version 1.X is compatible with Capacitor 5.X ```bash -npm install @proteansoftware/capacitor-square@V4 -npx cap sync -``` - -Version 3.X is compatible with Capacitor 3.X -```bash -npm install @proteansoftware/capacitor-square@V3 +npm install @dolaned/capacitor-square npx cap sync ``` @@ -28,7 +21,7 @@ App Initalisation - app.component.ts (Angular example) ```ts import { App } from "@capacitor/app"; import { Platform } from "@ionic/angular"; -import { CapacitorSquare } from "@proteansoftware/capacitor-square"; +import { CapacitorSquare } from "@dolaned/capacitor-square"; export class AppComponent { constructor(private platform: Platform) { @@ -57,7 +50,7 @@ export class AppComponent { Payment flow ```ts -import { CapacitorSquare } from "@proteansoftware/capacitor-square"; +import { CapacitorSquare } from "@dolaned/capacitor-square"; // // Initalise the square plugin diff --git a/dist/docs.json b/dist/docs.json deleted file mode 100644 index fc70cc5..0000000 --- a/dist/docs.json +++ /dev/null @@ -1,153 +0,0 @@ -{ - "api": { - "name": "CapacitorSquarePlugin", - "slug": "capacitorsquareplugin", - "docs": "", - "tags": [], - "methods": [ - { - "name": "initApp", - "signature": "(options: { applicationId: string; }) => any", - "parameters": [ - { - "name": "options", - "docs": "", - "type": "{ applicationId: string; }" - } - ], - "returns": "any", - "tags": [], - "docs": "", - "complexTypes": [], - "slug": "initapp" - }, - { - "name": "startTransaction", - "signature": "(options: { totalAmount: number; currencyCode: string; allowedPaymentMethods?: string[] | null; autoReturnTimeout?: number | AutoReturn.NoTimeout | null; callbackUrl?: string | null; }) => any", - "parameters": [ - { - "name": "options", - "docs": "", - "type": "{ totalAmount: number; currencyCode: string; allowedPaymentMethods?: {} | null | undefined; autoReturnTimeout?: number | null | undefined; callbackUrl?: string | null | undefined; }" - } - ], - "returns": "any", - "tags": [], - "docs": "", - "complexTypes": [ - "AutoReturn" - ], - "slug": "starttransaction" - }, - { - "name": "handleIosResponse", - "signature": "(options: { url: string; }) => any", - "parameters": [ - { - "name": "options", - "docs": "", - "type": "{ url: string; }" - } - ], - "returns": "any", - "tags": [], - "docs": "", - "complexTypes": [], - "slug": "handleiosresponse" - }, - { - "name": "addListener", - "signature": "(eventName: 'transactionComplete', listenerFunc: TransactionCompletedListener) => Promise & PluginListenerHandle", - "parameters": [ - { - "name": "eventName", - "docs": "", - "type": "\"transactionComplete\"" - }, - { - "name": "listenerFunc", - "docs": "", - "type": "(callback: { clientTransactionId: string; serverTransactionId: string; }) => void" - } - ], - "returns": "any", - "tags": [], - "docs": "", - "complexTypes": [ - "TransactionCompletedListener", - "PluginListenerHandle" - ], - "slug": "addlistener" - }, - { - "name": "addListener", - "signature": "(eventName: 'transactionFailed', listenerFunc: TransactionFailedListener) => Promise & PluginListenerHandle", - "parameters": [ - { - "name": "eventName", - "docs": "", - "type": "\"transactionFailed\"" - }, - { - "name": "listenerFunc", - "docs": "", - "type": "(callback: { error: any; }) => void" - } - ], - "returns": "any", - "tags": [], - "docs": "", - "complexTypes": [ - "TransactionFailedListener", - "PluginListenerHandle" - ], - "slug": "addlistener" - } - ], - "properties": [] - }, - "interfaces": [ - { - "name": "PluginListenerHandle", - "slug": "pluginlistenerhandle", - "docs": "", - "tags": [], - "methods": [], - "properties": [ - { - "name": "remove", - "tags": [], - "docs": "", - "complexTypes": [], - "type": "() => any" - } - ] - } - ], - "enums": [ - { - "name": "AutoReturn", - "slug": "autoreturn", - "members": [ - { - "name": "NoTimeout", - "value": "0", - "tags": [], - "docs": "No timeout" - }, - { - "name": "Min", - "value": "3200", - "tags": [], - "docs": "Minimum timeout value (3200 milliseconds)" - }, - { - "name": "Max", - "value": "10000", - "tags": [], - "docs": "Maximum timeout value (10000 milliseconds)" - } - ] - } - ] -} \ No newline at end of file diff --git a/dist/esm/definitions.d.ts b/dist/esm/definitions.d.ts deleted file mode 100644 index cc96f34..0000000 --- a/dist/esm/definitions.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { PluginListenerHandle } from "@capacitor/core"; -export declare type TransactionCompletedListener = (callback: { - clientTransactionId: string; - serverTransactionId: string; -}) => void; -export declare type TransactionFailedListener = (callback: { - error: any; -}) => void; -/** - * AutoReturn timeout values - */ -export declare enum AutoReturn { - /** - * No timeout - */ - NoTimeout = 0, - /** - * Minimum timeout value (3200 milliseconds) - */ - Min = 3200, - /** - * Maximum timeout value (10000 milliseconds) - */ - Max = 10000 -} -export interface CapacitorSquarePlugin { - initApp(options: { - applicationId: string; - }): Promise<{ - message: string; - }>; - startTransaction(options: { - /** - * amount in pennies/cents - */ - totalAmount: number; - /** - * // ISO currency code, must be support by square - */ - currencyCode: string; - /** - * Sqaure TendType: https://developer.squareup.com/docs/api/point-of-sale/android/com/squareup/sdk/pos/ChargeRequest.TenderType.html - */ - allowedPaymentMethods?: string[] | null; - /** - * The timeout to set in milliseconds, or AutoReturn.NoTimeout. If you specify a timeout, it must be between 3200 milliseconds and 10000 milliseconds. - */ - autoReturnTimeout?: number | AutoReturn.NoTimeout | null; - /** - * see iOS setup - */ - callbackUrl?: string | null; - }): Promise; - handleIosResponse(options: { - url: string; - }): Promise; - addListener(eventName: 'transactionComplete', listenerFunc: TransactionCompletedListener): Promise & PluginListenerHandle; - addListener(eventName: 'transactionFailed', listenerFunc: TransactionFailedListener): Promise & PluginListenerHandle; -} diff --git a/dist/esm/definitions.js b/dist/esm/definitions.js deleted file mode 100644 index edaa73d..0000000 --- a/dist/esm/definitions.js +++ /dev/null @@ -1,20 +0,0 @@ -/** - * AutoReturn timeout values - */ -export var AutoReturn; -(function (AutoReturn) { - /** - * No timeout - */ - AutoReturn[AutoReturn["NoTimeout"] = 0] = "NoTimeout"; - /** - * Minimum timeout value (3200 milliseconds) - */ - AutoReturn[AutoReturn["Min"] = 3200] = "Min"; - /** - * Maximum timeout value (10000 milliseconds) - */ - AutoReturn[AutoReturn["Max"] = 10000] = "Max"; -})(AutoReturn || (AutoReturn = {})); -; -//# sourceMappingURL=definitions.js.map \ No newline at end of file diff --git a/dist/esm/definitions.js.map b/dist/esm/definitions.js.map deleted file mode 100644 index 6220068..0000000 --- a/dist/esm/definitions.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"AASA;;GAEG;AACH,MAAM,CAAN,IAAY,UAaX;AAbD,WAAY,UAAU;IACpB;;OAEG;IACH,qDAAa,CAAA;IACb;;OAEG;IACH,4CAAU,CAAA;IACV;;OAEG;IACH,6CAAW,CAAA;AACb,CAAC,EAbW,UAAU,KAAV,UAAU,QAarB;AAAA,CAAC"} \ No newline at end of file diff --git a/dist/esm/index.d.ts b/dist/esm/index.d.ts deleted file mode 100644 index 976f3a6..0000000 --- a/dist/esm/index.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { CapacitorSquarePlugin } from './definitions'; -declare const CapacitorSquare: CapacitorSquarePlugin; -export * from './definitions'; -export { CapacitorSquare }; diff --git a/dist/esm/index.js b/dist/esm/index.js deleted file mode 100644 index 902f918..0000000 --- a/dist/esm/index.js +++ /dev/null @@ -1,7 +0,0 @@ -import { registerPlugin } from '@capacitor/core'; -const CapacitorSquare = registerPlugin('CapacitorSquare', { - web: () => import('./web').then(m => new m.CapacitorSquareWeb()), -}); -export * from './definitions'; -export { CapacitorSquare }; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/esm/index.js.map b/dist/esm/index.js.map deleted file mode 100644 index a67c5b8..0000000 --- a/dist/esm/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIjD,MAAM,eAAe,GAAG,cAAc,CAAwB,iBAAiB,EAAE;IAC/E,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,kBAAkB,EAAE,CAAC;CACjE,CAAC,CAAC;AAEH,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,eAAe,EAAE,CAAC"} \ No newline at end of file diff --git a/dist/esm/web.d.ts b/dist/esm/web.d.ts deleted file mode 100644 index 6c1906d..0000000 --- a/dist/esm/web.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { WebPlugin } from '@capacitor/core'; -import type { AutoReturn, CapacitorSquarePlugin } from './definitions'; -export declare class CapacitorSquareWeb extends WebPlugin implements CapacitorSquarePlugin { - initApp(_options: { - applicationId: string; - }): Promise<{ - message: string; - }>; - startTransaction(_options: { - totalAmount: number; - currencyCode: string; - allowedPaymentMethods?: string[] | null; - autoReturnTimeout?: number | AutoReturn.NoTimeout | null; - callbackUrl?: string | null; - }): Promise; - handleIosResponse(_options: { - url: string; - }): Promise; -} diff --git a/dist/esm/web.js b/dist/esm/web.js deleted file mode 100644 index 72d4c96..0000000 --- a/dist/esm/web.js +++ /dev/null @@ -1,13 +0,0 @@ -import { WebPlugin } from '@capacitor/core'; -export class CapacitorSquareWeb extends WebPlugin { - async initApp(_options) { - throw new Error("Method not implemented."); - } - async startTransaction(_options) { - throw new Error("Method not implemented."); - } - async handleIosResponse(_options) { - throw new Error("Method not implemented."); - } -} -//# sourceMappingURL=web.js.map \ No newline at end of file diff --git a/dist/esm/web.js.map b/dist/esm/web.js.map deleted file mode 100644 index db19875..0000000 --- a/dist/esm/web.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,MAAM,OAAO,kBAAmB,SAAQ,SAAS;IAC/C,KAAK,CAAC,OAAO,CAAC,QAAoC;QAChD,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IAED,KAAK,CAAC,gBAAgB,CAAC,QAMtB;QACC,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IAED,KAAK,CAAC,iBAAiB,CAAC,QAA0B;QAChD,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;CACF"} \ No newline at end of file diff --git a/dist/plugin.cjs.js b/dist/plugin.cjs.js deleted file mode 100644 index 5e509a3..0000000 --- a/dist/plugin.cjs.js +++ /dev/null @@ -1,48 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var core = require('@capacitor/core'); - -/** - * AutoReturn timeout values - */ -exports.AutoReturn = void 0; -(function (AutoReturn) { - /** - * No timeout - */ - AutoReturn[AutoReturn["NoTimeout"] = 0] = "NoTimeout"; - /** - * Minimum timeout value (3200 milliseconds) - */ - AutoReturn[AutoReturn["Min"] = 3200] = "Min"; - /** - * Maximum timeout value (10000 milliseconds) - */ - AutoReturn[AutoReturn["Max"] = 10000] = "Max"; -})(exports.AutoReturn || (exports.AutoReturn = {})); - -const CapacitorSquare = core.registerPlugin('CapacitorSquare', { - web: () => Promise.resolve().then(function () { return web; }).then(m => new m.CapacitorSquareWeb()), -}); - -class CapacitorSquareWeb extends core.WebPlugin { - async initApp(_options) { - throw new Error("Method not implemented."); - } - async startTransaction(_options) { - throw new Error("Method not implemented."); - } - async handleIosResponse(_options) { - throw new Error("Method not implemented."); - } -} - -var web = /*#__PURE__*/Object.freeze({ - __proto__: null, - CapacitorSquareWeb: CapacitorSquareWeb -}); - -exports.CapacitorSquare = CapacitorSquare; -//# sourceMappingURL=plugin.cjs.js.map diff --git a/dist/plugin.cjs.js.map b/dist/plugin.cjs.js.map deleted file mode 100644 index d6f069b..0000000 --- a/dist/plugin.cjs.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"plugin.cjs.js","sources":["esm/definitions.js","esm/index.js","esm/web.js"],"sourcesContent":["/**\n * AutoReturn timeout values\n */\nexport var AutoReturn;\n(function (AutoReturn) {\n /**\n * No timeout\n */\n AutoReturn[AutoReturn[\"NoTimeout\"] = 0] = \"NoTimeout\";\n /**\n * Minimum timeout value (3200 milliseconds)\n */\n AutoReturn[AutoReturn[\"Min\"] = 3200] = \"Min\";\n /**\n * Maximum timeout value (10000 milliseconds)\n */\n AutoReturn[AutoReturn[\"Max\"] = 10000] = \"Max\";\n})(AutoReturn || (AutoReturn = {}));\n;\n//# sourceMappingURL=definitions.js.map","import { registerPlugin } from '@capacitor/core';\nconst CapacitorSquare = registerPlugin('CapacitorSquare', {\n web: () => import('./web').then(m => new m.CapacitorSquareWeb()),\n});\nexport * from './definitions';\nexport { CapacitorSquare };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class CapacitorSquareWeb extends WebPlugin {\n async initApp(_options) {\n throw new Error(\"Method not implemented.\");\n }\n async startTransaction(_options) {\n throw new Error(\"Method not implemented.\");\n }\n async handleIosResponse(_options) {\n throw new Error(\"Method not implemented.\");\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["AutoReturn","registerPlugin","WebPlugin"],"mappings":";;;;;;AAAA;AACA;AACA;AACWA,4BAAW;AACtB,CAAC,UAAU,UAAU,EAAE;AACvB;AACA;AACA;AACA,IAAI,UAAU,CAAC,UAAU,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,GAAG,WAAW,CAAC;AAC1D;AACA;AACA;AACA,IAAI,UAAU,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,GAAG,KAAK,CAAC;AACjD;AACA;AACA;AACA,IAAI,UAAU,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,KAAK,CAAC;AAClD,CAAC,EAAEA,kBAAU,KAAKA,kBAAU,GAAG,EAAE,CAAC,CAAC;;AChB9B,MAAC,eAAe,GAAGC,mBAAc,CAAC,iBAAiB,EAAE;AAC1D,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,kBAAkB,EAAE,CAAC;AACpE,CAAC;;ACFM,MAAM,kBAAkB,SAASC,cAAS,CAAC;AAClD,IAAI,MAAM,OAAO,CAAC,QAAQ,EAAE;AAC5B,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;AACnD,KAAK;AACL,IAAI,MAAM,gBAAgB,CAAC,QAAQ,EAAE;AACrC,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;AACnD,KAAK;AACL,IAAI,MAAM,iBAAiB,CAAC,QAAQ,EAAE;AACtC,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;AACnD,KAAK;AACL;;;;;;;;;"} \ No newline at end of file diff --git a/dist/plugin.js b/dist/plugin.js deleted file mode 100644 index ea9b257..0000000 --- a/dist/plugin.js +++ /dev/null @@ -1,51 +0,0 @@ -var capacitorCapacitorSquare = (function (exports, core) { - 'use strict'; - - /** - * AutoReturn timeout values - */ - exports.AutoReturn = void 0; - (function (AutoReturn) { - /** - * No timeout - */ - AutoReturn[AutoReturn["NoTimeout"] = 0] = "NoTimeout"; - /** - * Minimum timeout value (3200 milliseconds) - */ - AutoReturn[AutoReturn["Min"] = 3200] = "Min"; - /** - * Maximum timeout value (10000 milliseconds) - */ - AutoReturn[AutoReturn["Max"] = 10000] = "Max"; - })(exports.AutoReturn || (exports.AutoReturn = {})); - - const CapacitorSquare = core.registerPlugin('CapacitorSquare', { - web: () => Promise.resolve().then(function () { return web; }).then(m => new m.CapacitorSquareWeb()), - }); - - class CapacitorSquareWeb extends core.WebPlugin { - async initApp(_options) { - throw new Error("Method not implemented."); - } - async startTransaction(_options) { - throw new Error("Method not implemented."); - } - async handleIosResponse(_options) { - throw new Error("Method not implemented."); - } - } - - var web = /*#__PURE__*/Object.freeze({ - __proto__: null, - CapacitorSquareWeb: CapacitorSquareWeb - }); - - exports.CapacitorSquare = CapacitorSquare; - - Object.defineProperty(exports, '__esModule', { value: true }); - - return exports; - -}({}, capacitorExports)); -//# sourceMappingURL=plugin.js.map diff --git a/dist/plugin.js.map b/dist/plugin.js.map deleted file mode 100644 index 0ed7d58..0000000 --- a/dist/plugin.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"plugin.js","sources":["esm/definitions.js","esm/index.js","esm/web.js"],"sourcesContent":["/**\n * AutoReturn timeout values\n */\nexport var AutoReturn;\n(function (AutoReturn) {\n /**\n * No timeout\n */\n AutoReturn[AutoReturn[\"NoTimeout\"] = 0] = \"NoTimeout\";\n /**\n * Minimum timeout value (3200 milliseconds)\n */\n AutoReturn[AutoReturn[\"Min\"] = 3200] = \"Min\";\n /**\n * Maximum timeout value (10000 milliseconds)\n */\n AutoReturn[AutoReturn[\"Max\"] = 10000] = \"Max\";\n})(AutoReturn || (AutoReturn = {}));\n;\n//# sourceMappingURL=definitions.js.map","import { registerPlugin } from '@capacitor/core';\nconst CapacitorSquare = registerPlugin('CapacitorSquare', {\n web: () => import('./web').then(m => new m.CapacitorSquareWeb()),\n});\nexport * from './definitions';\nexport { CapacitorSquare };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class CapacitorSquareWeb extends WebPlugin {\n async initApp(_options) {\n throw new Error(\"Method not implemented.\");\n }\n async startTransaction(_options) {\n throw new Error(\"Method not implemented.\");\n }\n async handleIosResponse(_options) {\n throw new Error(\"Method not implemented.\");\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["AutoReturn","registerPlugin","WebPlugin"],"mappings":";;;IAAA;IACA;IACA;AACWA,gCAAW;IACtB,CAAC,UAAU,UAAU,EAAE;IACvB;IACA;IACA;IACA,IAAI,UAAU,CAAC,UAAU,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,GAAG,WAAW,CAAC;IAC1D;IACA;IACA;IACA,IAAI,UAAU,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,GAAG,KAAK,CAAC;IACjD;IACA;IACA;IACA,IAAI,UAAU,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,KAAK,CAAC;IAClD,CAAC,EAAEA,kBAAU,KAAKA,kBAAU,GAAG,EAAE,CAAC,CAAC;;AChB9B,UAAC,eAAe,GAAGC,mBAAc,CAAC,iBAAiB,EAAE;IAC1D,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,kBAAkB,EAAE,CAAC;IACpE,CAAC;;ICFM,MAAM,kBAAkB,SAASC,cAAS,CAAC;IAClD,IAAI,MAAM,OAAO,CAAC,QAAQ,EAAE;IAC5B,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IACnD,KAAK;IACL,IAAI,MAAM,gBAAgB,CAAC,QAAQ,EAAE;IACrC,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IACnD,KAAK;IACL,IAAI,MAAM,iBAAiB,CAAC,QAAQ,EAAE;IACtC,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IACnD,KAAK;IACL;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/package.json b/package.json index 9a8822a..f5de4fc 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { - "name": "@proteansoftware/capacitor-square", - "version": "5.0.0", - "description": "Integrate with Square Payments SDK", + "name": "@dolaned/capacitor-square", + "version": "1.0.0", + "description": "Integrate with Square Payments SDK for capacitor", "main": "dist/plugin.cjs.js", "module": "dist/esm/index.js", "types": "dist/esm/index.d.ts", @@ -13,14 +13,21 @@ "ios/Plugin/", "ProteansoftwareCapacitorSquare.podspec" ], - "author": "Ashley Medway", + "contributors" : [ + { + "name" : "Ashley Medway", + "email" : "ashleymedway@me.com", + "url" : "https://github.com/AshleyMedway" + } + ], + "author": "Dylan Aird", "license": "MIT", "repository": { "type": "git", - "url": "git+https://github.com/ProteanSoftware/capacitor-square.git" + "url": "git+https://github.com/dolaned/capacitor-square.git" }, "bugs": { - "url": "https://github.com/ProteanSoftware/capacitor-square/issues" + "url": "https://github.com/dolaned/capacitor-square/issues" }, "keywords": [ "capacitor", From 1386e3c0e3a6d3d475489fa40f03c1febb8e3a79 Mon Sep 17 00:00:00 2001 From: Dylan Aird Date: Wed, 29 Nov 2023 09:24:05 +1100 Subject: [PATCH 6/7] update naming. --- ...rSquare.podspec => CapacitorSquare.podspec | 2 +- LICENSE | 2 +- android/build.gradle | 2 +- .../capacitor/square/CapacitorSquare.java | 2 +- .../square/CapacitorSquarePlugin.java | 2 +- package.json | 208 +++++++++++++++++- 6 files changed, 206 insertions(+), 12 deletions(-) rename ProteansoftwareCapacitorSquare.podspec => CapacitorSquare.podspec (92%) rename android/src/main/java/com/{proteansoftware => dolaned}/capacitor/square/CapacitorSquare.java (98%) rename android/src/main/java/com/{proteansoftware => dolaned}/capacitor/square/CapacitorSquarePlugin.java (99%) diff --git a/ProteansoftwareCapacitorSquare.podspec b/CapacitorSquare.podspec similarity index 92% rename from ProteansoftwareCapacitorSquare.podspec rename to CapacitorSquare.podspec index 3645396..fa3ba88 100644 --- a/ProteansoftwareCapacitorSquare.podspec +++ b/CapacitorSquare.podspec @@ -3,7 +3,7 @@ require 'json' package = JSON.parse(File.read(File.join(__dir__, 'package.json'))) Pod::Spec.new do |s| - s.name = 'ProteansoftwareCapacitorSquare' + s.name = 'CapacitorSquare' s.version = package['version'] s.summary = package['description'] s.license = package['license'] diff --git a/LICENSE b/LICENSE index 14a5b46..5f771a0 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2020 Protean Software +Copyright (c) 2023 Dolaned Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/android/build.gradle b/android/build.gradle index 9347e9b..f64abc4 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -18,7 +18,7 @@ buildscript { apply plugin: 'com.android.library' android { - namespace "com.proteansoftware.capacitor.square" + namespace "com.dolaned.capacitor.square" compileSdkVersion project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 33 defaultConfig { minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 22 diff --git a/android/src/main/java/com/proteansoftware/capacitor/square/CapacitorSquare.java b/android/src/main/java/com/dolaned/capacitor/square/CapacitorSquare.java similarity index 98% rename from android/src/main/java/com/proteansoftware/capacitor/square/CapacitorSquare.java rename to android/src/main/java/com/dolaned/capacitor/square/CapacitorSquare.java index 1d951b0..f3d6925 100644 --- a/android/src/main/java/com/proteansoftware/capacitor/square/CapacitorSquare.java +++ b/android/src/main/java/com/dolaned/capacitor/square/CapacitorSquare.java @@ -1,4 +1,4 @@ -package com.proteansoftware.capacitor.square; +package com.dolaned.capacitor.square; import android.content.Context; import android.content.Intent; diff --git a/android/src/main/java/com/proteansoftware/capacitor/square/CapacitorSquarePlugin.java b/android/src/main/java/com/dolaned/capacitor/square/CapacitorSquarePlugin.java similarity index 99% rename from android/src/main/java/com/proteansoftware/capacitor/square/CapacitorSquarePlugin.java rename to android/src/main/java/com/dolaned/capacitor/square/CapacitorSquarePlugin.java index aba62a7..182b4b1 100644 --- a/android/src/main/java/com/proteansoftware/capacitor/square/CapacitorSquarePlugin.java +++ b/android/src/main/java/com/dolaned/capacitor/square/CapacitorSquarePlugin.java @@ -1,4 +1,4 @@ -package com.proteansoftware.capacitor.square; +package com.dolaned.capacitor.square; import android.app.Activity; import android.content.ActivityNotFoundException; diff --git a/package.json b/package.json index f5de4fc..75234ea 100644 --- a/package.json +++ b/package.json @@ -11,14 +11,10 @@ "android/build.gradle", "dist/", "ios/Plugin/", - "ProteansoftwareCapacitorSquare.podspec" + "CapacitorSquare.podspec" ], - "contributors" : [ - { - "name" : "Ashley Medway", - "email" : "ashleymedway@me.com", - "url" : "https://github.com/AshleyMedway" - } + "contributors": [ + "Ashley Medway (https://github.com/AshleyMedway)" ], "author": "Dylan Aird", "license": "MIT", @@ -81,5 +77,203 @@ "android": { "src": "android" } + }, + "homepage": "https://github.com/dolaned/capacitor-square#readme", + "dependencies": { + "acorn": "^7.4.1", + "acorn-jsx": "^5.3.2", + "ajv": "^6.12.6", + "ansi-colors": "^4.1.1", + "ansi-regex": "^5.0.1", + "ansi-styles": "^4.3.0", + "argparse": "^1.0.10", + "array-includes": "^3.1.3", + "array-union": "^2.1.0", + "array.prototype.flat": "^1.2.4", + "astral-regex": "^2.0.0", + "at-least-node": "^1.0.0", + "balanced-match": "^1.0.2", + "brace-expansion": "^1.1.11", + "braces": "^3.0.2", + "call-bind": "^1.0.2", + "callsites": "^3.1.0", + "chalk": "^4.1.1", + "chevrotain": "^6.5.0", + "color-convert": "^2.0.1", + "color-name": "^1.1.4", + "colorette": "^1.2.2", + "concat-map": "^0.0.1", + "cosmiconfig": "^6.0.0", + "cross-spawn": "^7.0.3", + "debug": "^4.3.2", + "deep-is": "^0.1.3", + "define-properties": "^1.1.3", + "dir-glob": "^3.0.1", + "doctrine": "^3.0.0", + "emoji-regex": "^6.1.1", + "enquirer": "^2.3.6", + "error-ex": "^1.3.2", + "es-abstract": "^1.18.3", + "es-to-primitive": "^1.2.1", + "escape-string-regexp": "^4.0.0", + "eslint-config-prettier": "^6.15.0", + "eslint-import-resolver-node": "^0.3.4", + "eslint-module-utils": "^2.6.1", + "eslint-plugin-import": "^2.23.4", + "eslint-scope": "^5.1.1", + "eslint-utils": "^3.0.0", + "eslint-visitor-keys": "^2.1.0", + "espree": "^7.3.1", + "esprima": "^4.0.1", + "esquery": "^1.4.0", + "esrecurse": "^4.3.0", + "estraverse": "^4.3.0", + "esutils": "^2.0.3", + "fast-deep-equal": "^3.1.3", + "fast-glob": "^3.2.7", + "fast-json-stable-stringify": "^2.1.0", + "fast-levenshtein": "^2.0.6", + "fastq": "^1.11.1", + "file-entry-cache": "^6.0.1", + "fill-range": "^7.0.1", + "find-up": "^2.1.0", + "flat-cache": "^3.0.4", + "flatted": "^3.2.1", + "fs-extra": "^9.1.0", + "fs.realpath": "^1.0.0", + "function-bind": "^1.1.1", + "functional-red-black-tree": "^1.0.1", + "get-intrinsic": "^1.1.1", + "get-stdin": "^6.0.0", + "github-slugger": "^1.3.0", + "glob": "^7.1.7", + "glob-parent": "^5.1.2", + "globals": "^13.10.0", + "globby": "^11.0.4", + "graceful-fs": "^4.2.6", + "has": "^1.0.3", + "has-bigints": "^1.0.1", + "has-flag": "^4.0.0", + "has-symbols": "^1.0.2", + "hosted-git-info": "^2.8.9", + "ignore": "^4.0.6", + "import-fresh": "^3.3.0", + "imurmurhash": "^0.1.4", + "inflight": "^1.0.6", + "inherits": "^2.0.4", + "is-arrayish": "^0.2.1", + "is-bigint": "^1.0.2", + "is-boolean-object": "^1.1.1", + "is-callable": "^1.2.3", + "is-core-module": "^2.5.0", + "is-date-object": "^1.0.4", + "is-extglob": "^2.1.1", + "is-fullwidth-code-point": "^3.0.0", + "is-glob": "^4.0.1", + "is-negative-zero": "^2.0.1", + "is-number": "^7.0.0", + "is-number-object": "^1.0.5", + "is-regex": "^1.1.3", + "is-string": "^1.0.6", + "is-symbol": "^1.0.4", + "isexe": "^2.0.0", + "java-parser": "^1.0.2", + "js-tokens": "^4.0.0", + "js-yaml": "^3.14.1", + "json-parse-better-errors": "^1.0.2", + "json-parse-even-better-errors": "^2.3.1", + "json-schema-traverse": "^0.4.1", + "json-stable-stringify-without-jsonify": "^1.0.1", + "json5": "^2.2.0", + "jsonfile": "^6.1.0", + "levn": "^0.4.1", + "lines-and-columns": "^1.1.6", + "load-json-file": "^4.0.0", + "locate-path": "^2.0.0", + "lodash": "^4.17.21", + "lodash.clonedeep": "^4.5.0", + "lodash.merge": "^4.6.2", + "lodash.truncate": "^4.4.2", + "lru-cache": "^6.0.0", + "merge2": "^1.4.1", + "micromatch": "^4.0.4", + "minimatch": "^3.0.4", + "minimist": "^1.2.6", + "ms": "^2.1.2", + "natural-compare": "^1.4.0", + "normalize-package-data": "^2.5.0", + "object-inspect": "^1.11.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.2", + "object.values": "^1.1.4", + "once": "^1.4.0", + "optionator": "^0.9.1", + "p-limit": "^1.3.0", + "p-locate": "^2.0.0", + "p-try": "^1.0.0", + "parent-module": "^1.0.1", + "parse-json": "^4.0.0", + "path-exists": "^3.0.0", + "path-is-absolute": "^1.0.1", + "path-key": "^3.1.1", + "path-parse": "^1.0.7", + "path-type": "^4.0.0", + "picomatch": "^2.3.0", + "pify": "^3.0.0", + "pkg-dir": "^2.0.0", + "pkg-up": "^2.0.0", + "prelude-ls": "^1.2.1", + "progress": "^2.0.3", + "punycode": "^2.1.1", + "queue-microtask": "^1.2.3", + "read-pkg": "^3.0.0", + "read-pkg-up": "^3.0.0", + "regexp-to-ast": "^0.4.0", + "regexpp": "^3.2.0", + "require-from-string": "^2.0.2", + "resolve": "^1.20.0", + "resolve-from": "^4.0.0", + "reusify": "^1.0.4", + "run-parallel": "^1.2.0", + "semver": "^7.3.5", + "shebang-command": "^2.0.0", + "shebang-regex": "^3.0.0", + "signal-exit": "^3.0.3", + "slash": "^3.0.0", + "slice-ansi": "^4.0.0", + "spdx-correct": "^3.1.1", + "spdx-exceptions": "^2.3.0", + "spdx-expression-parse": "^3.0.1", + "spdx-license-ids": "^3.0.9", + "sprintf-js": "^1.0.3", + "string-width": "^4.2.2", + "string.prototype.trimend": "^1.0.4", + "string.prototype.trimstart": "^1.0.4", + "strip-ansi": "^6.0.0", + "strip-bom": "^3.0.0", + "strip-json-comments": "^3.1.1", + "supports-color": "^7.2.0", + "table": "^6.7.1", + "text-table": "^0.2.0", + "to-regex-range": "^5.0.1", + "tree-kill": "^1.2.2", + "tsconfig-paths": "^3.10.1", + "tslib": "^2.3.0", + "tsutils": "^3.21.0", + "type-check": "^0.4.0", + "type-fest": "^0.20.2", + "unbox-primitive": "^1.0.1", + "universalify": "^2.0.0", + "untildify": "^4.0.0", + "uri-js": "^4.4.1", + "v8-compile-cache": "^2.3.0", + "validate-npm-package-license": "^3.0.4", + "which": "^2.0.2", + "which-boxed-primitive": "^1.0.2", + "word-wrap": "^1.2.3", + "wrap-ansi": "^7.0.0", + "wrappy": "^1.0.2", + "yallist": "^4.0.0", + "yaml": "^1.10.2" } } From 288f7694afd28c2b9ec8c5af3dd804171c0f06ac Mon Sep 17 00:00:00 2001 From: Dylan Aird Date: Wed, 29 Nov 2023 10:33:45 +1100 Subject: [PATCH 7/7] latest commit. --- CapacitorSquare.podspec => DolanedCapacitorSquare.podspec | 2 +- package.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) rename CapacitorSquare.podspec => DolanedCapacitorSquare.podspec (93%) diff --git a/CapacitorSquare.podspec b/DolanedCapacitorSquare.podspec similarity index 93% rename from CapacitorSquare.podspec rename to DolanedCapacitorSquare.podspec index fa3ba88..2bf2f2e 100644 --- a/CapacitorSquare.podspec +++ b/DolanedCapacitorSquare.podspec @@ -3,7 +3,7 @@ require 'json' package = JSON.parse(File.read(File.join(__dir__, 'package.json'))) Pod::Spec.new do |s| - s.name = 'CapacitorSquare' + s.name = 'DolanedCapacitorSquare' s.version = package['version'] s.summary = package['description'] s.license = package['license'] diff --git a/package.json b/package.json index 75234ea..50f826f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@dolaned/capacitor-square", - "version": "1.0.0", + "version": "1.1.0", "description": "Integrate with Square Payments SDK for capacitor", "main": "dist/plugin.cjs.js", "module": "dist/esm/index.js", @@ -11,7 +11,7 @@ "android/build.gradle", "dist/", "ios/Plugin/", - "CapacitorSquare.podspec" + "DolanedCapacitorSquare.podspec" ], "contributors": [ "Ashley Medway (https://github.com/AshleyMedway)"