@shopify/shopify-api 7.3.0 → 7.3.1
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/adapters/mock/index.js +3 -0
- package/adapters/mock/index.js.map +1 -1
- package/adapters/node/index.js +3 -0
- package/adapters/node/index.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/webhooks/register.d.ts +2 -2
- package/lib/webhooks/register.d.ts.map +1 -1
- package/lib/webhooks/register.js +2 -2
- package/package.json +1 -1
- package/runtime/crypto/crypto.d.ts +1 -1
- package/runtime/crypto/crypto.d.ts.map +1 -1
- package/runtime/crypto/crypto.js +6 -11
- package/runtime/crypto/crypto.js.map +1 -1
package/adapters/mock/index.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const crypto_1 = tslib_1.__importDefault(require("crypto"));
|
|
3
5
|
const runtime_1 = require("../../runtime");
|
|
4
6
|
const adapter_1 = require("./adapter");
|
|
5
7
|
(0, runtime_1.setAbstractFetchFunc)(adapter_1.mockFetch);
|
|
@@ -7,4 +9,5 @@ const adapter_1 = require("./adapter");
|
|
|
7
9
|
(0, runtime_1.setAbstractConvertResponseFunc)(adapter_1.mockConvertResponse);
|
|
8
10
|
(0, runtime_1.setAbstractConvertHeadersFunc)(adapter_1.mockConvertHeaders);
|
|
9
11
|
(0, runtime_1.setAbstractRuntimeString)(adapter_1.mockRuntimeString);
|
|
12
|
+
(0, runtime_1.setCrypto)(crypto_1.default);
|
|
10
13
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AAAA,4DAA4B;AAE5B,2CAOuB;AAEvB,uCAMmB;AAEnB,IAAA,8BAAoB,EAAC,mBAAS,CAAC,CAAC;AAChC,IAAA,uCAA6B,EAAC,4BAAkB,CAAC,CAAC;AAClD,IAAA,wCAA8B,EAAC,6BAAmB,CAAC,CAAC;AACpD,IAAA,uCAA6B,EAAC,4BAAkB,CAAC,CAAC;AAClD,IAAA,kCAAwB,EAAC,2BAAiB,CAAC,CAAC;AAC5C,IAAA,mBAAS,EAAC,gBAAa,CAAC,CAAC"}
|
package/adapters/node/index.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const crypto_1 = tslib_1.__importDefault(require("crypto"));
|
|
3
5
|
const runtime_1 = require("../../runtime");
|
|
4
6
|
const adapter_1 = require("./adapter");
|
|
5
7
|
(0, runtime_1.setAbstractFetchFunc)(adapter_1.nodeFetch);
|
|
@@ -8,4 +10,5 @@ const adapter_1 = require("./adapter");
|
|
|
8
10
|
(0, runtime_1.setAbstractConvertResponseFunc)(adapter_1.nodeConvertAndSendResponse);
|
|
9
11
|
(0, runtime_1.setAbstractConvertHeadersFunc)(adapter_1.nodeConvertAndSetHeaders);
|
|
10
12
|
(0, runtime_1.setAbstractRuntimeString)(adapter_1.nodeRuntimeString);
|
|
13
|
+
(0, runtime_1.setCrypto)(crypto_1.default);
|
|
11
14
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AAAA,4DAA4B;AAE5B,2CAQuB;AAEvB,uCAOmB;AAEnB,IAAA,8BAAoB,EAAC,mBAAS,CAAC,CAAC;AAChC,IAAA,uCAA6B,EAAC,4BAAkB,CAAC,CAAC;AAClD,IAAA,gDAAsC,EAAC,qCAA2B,CAAC,CAAC;AACpE,IAAA,wCAA8B,EAAC,oCAA0B,CAAC,CAAC;AAC3D,IAAA,uCAA6B,EAAC,kCAAwB,CAAC,CAAC;AACxD,IAAA,kCAAwB,EAAC,2BAAiB,CAAC,CAAC;AAC5C,IAAA,mBAAS,EAAC,gBAAa,CAAC,CAAC"}
|
package/lib/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const SHOPIFY_API_LIBRARY_VERSION = "7.3.
|
|
1
|
+
export declare const SHOPIFY_API_LIBRARY_VERSION = "7.3.1";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/lib/version.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ConfigInterface } from '../base-types';
|
|
2
2
|
import { WebhookRegistry, RegisterReturn, RegisterParams } from './types';
|
|
3
3
|
export declare function register(config: ConfigInterface, webhookRegistry: WebhookRegistry): ({ session, }: RegisterParams) => Promise<RegisterReturn>;
|
|
4
|
-
export declare const TEMPLATE_GET_HANDLERS = "{\n webhookSubscriptions(\n first: 250,\n after: {{END_CURSOR}},\n ) {\n edges {\n node {\n id\n topic\n includeFields\n metafieldNamespaces\n privateMetafieldNamespaces\n endpoint {\n __typename\n ... on WebhookHttpEndpoint {\n callbackUrl\n }\n ... on WebhookEventBridgeEndpoint {\n arn\n }\n ... on WebhookPubSubEndpoint {\n pubSubProject\n pubSubTopic\n }\n }\n }\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n}";
|
|
5
|
-
export declare const TEMPLATE_MUTATION = "\n mutation
|
|
4
|
+
export declare const TEMPLATE_GET_HANDLERS = "query shopifyApiReadWebhookSubscriptions {\n webhookSubscriptions(\n first: 250,\n after: {{END_CURSOR}},\n ) {\n edges {\n node {\n id\n topic\n includeFields\n metafieldNamespaces\n privateMetafieldNamespaces\n endpoint {\n __typename\n ... on WebhookHttpEndpoint {\n callbackUrl\n }\n ... on WebhookEventBridgeEndpoint {\n arn\n }\n ... on WebhookPubSubEndpoint {\n pubSubProject\n pubSubTopic\n }\n }\n }\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n}";
|
|
5
|
+
export declare const TEMPLATE_MUTATION = "\n mutation shopifyApiCreateWebhookSubscription {\n {{MUTATION_NAME}}(\n {{IDENTIFIER}},\n {{MUTATION_PARAMS}}\n ) {\n userErrors {\n field\n message\n }\n }\n }\n";
|
|
6
6
|
//# sourceMappingURL=register.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register.d.ts","sourceRoot":"","sources":["register.ts"],"names":[],"mappings":"AAOA,OAAO,EAAC,eAAe,EAAC,MAAM,eAAe,CAAC;AAK9C,OAAO,EACL,eAAe,EACf,cAAc,EAOd,cAAc,EACf,MAAM,SAAS,CAAC;AA0BjB,wBAAgB,QAAQ,CACtB,MAAM,EAAE,eAAe,EACvB,eAAe,EAAE,eAAe,kBAI7B,cAAc,KAAG,QAAQ,cAAc,CAAC,CA4D5C;AAiYD,eAAO,MAAM,qBAAqB
|
|
1
|
+
{"version":3,"file":"register.d.ts","sourceRoot":"","sources":["register.ts"],"names":[],"mappings":"AAOA,OAAO,EAAC,eAAe,EAAC,MAAM,eAAe,CAAC;AAK9C,OAAO,EACL,eAAe,EACf,cAAc,EAOd,cAAc,EACf,MAAM,SAAS,CAAC;AA0BjB,wBAAgB,QAAQ,CACtB,MAAM,EAAE,eAAe,EACvB,eAAe,EAAE,eAAe,kBAI7B,cAAc,KAAG,QAAQ,cAAc,CAAC,CA4D5C;AAiYD,eAAO,MAAM,qBAAqB,wpBAgChC,CAAC;AAEH,eAAO,MAAM,iBAAiB,qNAY7B,CAAC"}
|
package/lib/webhooks/register.js
CHANGED
|
@@ -312,7 +312,7 @@ function isSuccess(result, handler, operation) {
|
|
|
312
312
|
result.data[mutationName] &&
|
|
313
313
|
result.data[mutationName].userErrors.length === 0);
|
|
314
314
|
}
|
|
315
|
-
exports.TEMPLATE_GET_HANDLERS = `{
|
|
315
|
+
exports.TEMPLATE_GET_HANDLERS = `query shopifyApiReadWebhookSubscriptions {
|
|
316
316
|
webhookSubscriptions(
|
|
317
317
|
first: 250,
|
|
318
318
|
after: {{END_CURSOR}},
|
|
@@ -346,7 +346,7 @@ exports.TEMPLATE_GET_HANDLERS = `{
|
|
|
346
346
|
}
|
|
347
347
|
}`;
|
|
348
348
|
exports.TEMPLATE_MUTATION = `
|
|
349
|
-
mutation
|
|
349
|
+
mutation shopifyApiCreateWebhookSubscription {
|
|
350
350
|
{{MUTATION_NAME}}(
|
|
351
351
|
{{IDENTIFIER}},
|
|
352
352
|
{{MUTATION_PARAMS}}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shopify/shopify-api",
|
|
3
|
-
"version": "7.3.
|
|
3
|
+
"version": "7.3.1",
|
|
4
4
|
"description": "Shopify API Library for Node - accelerate development with support for authentication, graphql proxy, webhooks",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"crypto.d.ts","sourceRoot":"","sources":["crypto.ts"],"names":[],"mappings":"AAGA,QAAA,IAAI,SAAS,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"crypto.d.ts","sourceRoot":"","sources":["crypto.ts"],"names":[],"mappings":"AAGA,QAAA,IAAI,SAAS,EAAE,MAAM,CAAC;AAQtB,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAE9C;AAED,OAAO,EAAC,SAAS,IAAI,MAAM,EAAC,CAAC"}
|
package/runtime/crypto/crypto.js
CHANGED
|
@@ -5,19 +5,14 @@ exports.crypto = exports.setCrypto = void 0;
|
|
|
5
5
|
// eslint-disable-next-line import/no-mutable-exports
|
|
6
6
|
let cryptoVar;
|
|
7
7
|
exports.crypto = cryptoVar;
|
|
8
|
-
|
|
9
|
-
// CF worker will complain about a line reading require('crypto') even if it's never executed, as is the case here,
|
|
10
|
-
// so we create a hacky workaround to make it happy.
|
|
11
|
-
const cfWorkerWorkaround = 'crypto';
|
|
12
|
-
exports.crypto = cryptoVar = require(cfWorkerWorkaround);
|
|
13
|
-
}
|
|
14
|
-
else {
|
|
8
|
+
try {
|
|
15
9
|
exports.crypto = cryptoVar = crypto;
|
|
16
10
|
}
|
|
17
|
-
|
|
18
|
-
//
|
|
19
|
-
|
|
20
|
-
|
|
11
|
+
catch (_e) {
|
|
12
|
+
// This will fail for Node, but we're explicitly calling the below function to set it
|
|
13
|
+
}
|
|
14
|
+
function setCrypto(crypto) {
|
|
15
|
+
exports.crypto = cryptoVar = crypto;
|
|
21
16
|
}
|
|
22
17
|
exports.setCrypto = setCrypto;
|
|
23
18
|
//# sourceMappingURL=crypto.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"crypto.js","sourceRoot":"","sources":["crypto.ts"],"names":[],"mappings":";AAAA,mEAAmE;;;AAEnE,qDAAqD;AACrD,IAAI,SAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"crypto.js","sourceRoot":"","sources":["crypto.ts"],"names":[],"mappings":";AAAA,mEAAmE;;;AAEnE,qDAAqD;AACrD,IAAI,SAAiB,CAAC;AAYD,2BAAM;AAV3B,IAAI;IACF,iBAAA,SAAS,GAAG,MAAM,CAAC;CACpB;AAAC,OAAO,EAAE,EAAE;IACX,qFAAqF;CACtF;AAED,SAAgB,SAAS,CAAC,MAAc;IACtC,iBAAA,SAAS,GAAG,MAAM,CAAC;AACrB,CAAC;AAFD,8BAEC"}
|