@things-factory/integration-marketplace 7.0.23 → 7.0.26

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/integration-marketplace",
3
- "version": "7.0.23",
3
+ "version": "7.0.26",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
@@ -27,19 +27,18 @@
27
27
  "dependencies": {
28
28
  "@operato/data-grist": "^7.0.0",
29
29
  "@things-factory/apptool-ui": "^7.0.22",
30
- "@things-factory/auth-ui": "^7.0.22",
30
+ "@things-factory/auth-ui": "^7.0.24",
31
31
  "@things-factory/biz-base": "^7.0.22",
32
32
  "@things-factory/code-ui": "^7.0.22",
33
33
  "@things-factory/context-ui": "^7.0.19",
34
34
  "@things-factory/i18n-base": "^7.0.22",
35
- "@things-factory/integration-lmd": "^7.0.23",
36
- "@things-factory/integration-ui": "^7.0.23",
35
+ "@things-factory/integration-lmd": "^7.0.24",
36
+ "@things-factory/integration-ui": "^7.0.24",
37
37
  "@things-factory/more-ui": "^7.0.19",
38
- "@things-factory/resource-ui": "^7.0.22",
38
+ "@things-factory/resource-ui": "^7.0.24",
39
39
  "@things-factory/setting-ui": "^7.0.22",
40
40
  "debug": "^4.1.1",
41
- "node-fetch": "^2.6.0",
42
- "querystring": "^0.2.1"
41
+ "node-fetch": "^2.6.0"
43
42
  },
44
43
  "devDependencies": {
45
44
  "@microsoft/tsdoc": "^0.12.20",
@@ -51,5 +50,5 @@
51
50
  "nock": "^13.0.2",
52
51
  "should": "^13.2.3"
53
52
  },
54
- "gitHead": "3ead982bc9c59057e0b56df0b33f10deb6baeea5"
53
+ "gitHead": "a8c7831361a556ac922373a841dcff968409dfee"
55
54
  }
@@ -1,6 +1,6 @@
1
1
  import fetch from 'node-fetch'
2
2
  import crypto from 'crypto'
3
- import querystring from 'querystring'
3
+ import { URLSearchParams } from 'url'
4
4
 
5
5
  import { createPayloadLog } from '@things-factory/integration-base'
6
6
 
@@ -44,7 +44,8 @@ export class Shopify {
44
44
  isValidSignature(query) {
45
45
  const { apiSecret } = this.config
46
46
  const { hmac, ...params } = query
47
- const queryParams = querystring.stringify(params)
47
+
48
+ const queryParams = new URLSearchParams(params).toString()
48
49
 
49
50
  return hmac === crypto.createHmac('sha256', apiSecret).update(queryParams).digest('hex')
50
51
  }
@@ -56,9 +57,7 @@ export class Shopify {
56
57
  async get(path: string, data: any) {
57
58
  const { shop, accessToken } = this.config
58
59
 
59
- const qs = Object.entries(data)
60
- .map(([k, v]) => `${k}=${encodeURIComponent(String(v))}`)
61
- .join('&')
60
+ const qs = new URLSearchParams(data).toString()
62
61
 
63
62
  const endpoint = `https://${shop}.myshopify.com/admin/api/2020-01${path}${qs ? '?' + qs : ''}`
64
63
  debug('endpoint', endpoint)