@agnostack/next-shopify 1.7.0-alpha.43 → 1.7.0-alpha.44
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.
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const utils_1 = require("../utils");
|
|
4
|
-
const uninstallHelper = async ({
|
|
4
|
+
const uninstallHelper = async ({ req, res, serverRuntimeConfig }) => {
|
|
5
5
|
try {
|
|
6
6
|
const shop = req.headers['x-shopify-shop-domain'];
|
|
7
7
|
if (utils_1.stringEmpty(shop)) {
|
|
8
8
|
return res.status(400).send('Invalid shop');
|
|
9
9
|
}
|
|
10
|
-
const {
|
|
11
|
-
let response
|
|
10
|
+
const { findSession } = await utils_1.getShopifyHelpers(serverRuntimeConfig, { shop }); // deleteSessions // shopify,
|
|
11
|
+
// let response
|
|
12
12
|
try {
|
|
13
|
-
response = await shopify.webhooks.process({
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
})
|
|
13
|
+
// response = await shopify.webhooks.process({
|
|
14
|
+
// rawBody: rawBody.toString(),
|
|
15
|
+
// rawRequest: req,
|
|
16
|
+
// rawResponse: res,
|
|
17
|
+
// })
|
|
18
18
|
const sessionsIds = await findSession(shop);
|
|
19
19
|
console.log(`>>> ~ sessionsIds`, sessionsIds);
|
|
20
20
|
// if (arrayNotEmpty(sessionsIds)) {
|
|
@@ -23,10 +23,10 @@ const uninstallHelper = async ({ rawBody, req, res, serverRuntimeConfig }) => {
|
|
|
23
23
|
}
|
|
24
24
|
catch (error) {
|
|
25
25
|
console.error('Error processing webhook', error);
|
|
26
|
-
response = error.response
|
|
26
|
+
// response = error.response
|
|
27
27
|
}
|
|
28
28
|
console.log(`>>> ~ return`);
|
|
29
|
-
return response
|
|
29
|
+
return res.status(200).send('FOO'); // response
|
|
30
30
|
}
|
|
31
31
|
catch (error) {
|
|
32
32
|
console.error('Error handling uninstall', error);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uninstall.js","sourceRoot":"","sources":["../../src/helpers/uninstall.js"],"names":[],"mappings":";;AAAA,oCAIiB;AAEjB,MAAM,eAAe,GAAG,KAAK,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"uninstall.js","sourceRoot":"","sources":["../../src/helpers/uninstall.js"],"names":[],"mappings":";;AAAA,oCAIiB;AAEjB,MAAM,eAAe,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,mBAAmB,EAAE,EAAE,EAAE;IAClE,IAAI;QACF,MAAM,IAAI,GAAG,GAAG,CAAC,OAAO,CAAC,uBAAuB,CAAC,CAAA;QAEjD,IAAI,mBAAW,CAAC,IAAI,CAAC,EAAE;YACrB,OAAO,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAA;SAC5C;QAED,MAAM,EAAE,WAAW,EAAE,GAAG,MAAM,yBAAiB,CAAC,mBAAmB,EAAE,EAAE,IAAI,EAAE,CAAC,CAAA,CAAC,8BAA8B;QAE7G,eAAe;QACf,IAAI;YACF,8CAA8C;YAC9C,iCAAiC;YACjC,qBAAqB;YACrB,sBAAsB;YACtB,KAAK;YAEL,MAAM,WAAW,GAAG,MAAM,WAAW,CAAC,IAAI,CAAC,CAAA;YAC3C,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,WAAW,CAAC,CAAA;YAC7C,oCAAoC;YACpC,0DAA0D;YAC1D,IAAI;SACL;QAAC,OAAO,KAAK,EAAE;YACd,OAAO,CAAC,KAAK,CAAC,0BAA0B,EAAE,KAAK,CAAC,CAAA;YAChD,4BAA4B;SAC7B;QAED,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAA;QAE3B,OAAO,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA,CAAC,WAAW;KAE/C;IAAC,OAAO,KAAK,EAAE;QACd,OAAO,CAAC,KAAK,CAAC,0BAA0B,EAAE,KAAK,CAAC,CAAA;QAChD,sFAAsF;QACtF,OAAO,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAA;KACxD;AACH,CAAC,CAAA;AAED,kBAAe,eAAe,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agnostack/next-shopify",
|
|
3
|
-
"version": "1.7.0-alpha.
|
|
3
|
+
"version": "1.7.0-alpha.44",
|
|
4
4
|
"author": "agnoStack Dev <developers@agnostack.com> (https://agnostack.com)",
|
|
5
5
|
"owner": "agnoStack",
|
|
6
6
|
"description": "Please contact agnoStack via info@agnostack.com for any questions",
|