@agnostack/next-shopify 1.15.0-beta.2 → 1.15.0-beta.21
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/CHANGELOG.md +136 -0
- package/dist/lib/handlers/api/auth.js +15 -11
- package/dist/lib/handlers/api/auth.js.map +1 -1
- package/dist/lib/handlers/api/billing.js +13 -9
- package/dist/lib/handlers/api/billing.js.map +1 -1
- package/dist/lib/handlers/api/callback.js +37 -33
- package/dist/lib/handlers/api/callback.js.map +1 -1
- package/dist/lib/handlers/api/index.js +25 -7
- package/dist/lib/handlers/api/index.js.map +1 -1
- package/dist/lib/handlers/api/uninstall.js +12 -8
- package/dist/lib/handlers/api/uninstall.js.map +1 -1
- package/dist/lib/handlers/api/verifiable/appInstallation.js +11 -7
- package/dist/lib/handlers/api/verifiable/appInstallation.js.map +1 -1
- package/dist/lib/handlers/api/verifiable/graph.js +26 -22
- package/dist/lib/handlers/api/verifiable/graph.js.map +1 -1
- package/dist/lib/handlers/api/verifiable/index.js +21 -5
- package/dist/lib/handlers/api/verifiable/index.js.map +1 -1
- package/dist/lib/handlers/api/verifiable/proxy.js +39 -32
- package/dist/lib/handlers/api/verifiable/proxy.js.map +1 -1
- package/dist/lib/handlers/api/verifiable/rest.js +23 -19
- package/dist/lib/handlers/api/verifiable/rest.js.map +1 -1
- package/dist/lib/handlers/api/verifiable/token.js +27 -23
- package/dist/lib/handlers/api/verifiable/token.js.map +1 -1
- package/dist/lib/handlers/api/webhook.js +13 -9
- package/dist/lib/handlers/api/webhook.js.map +1 -1
- package/dist/lib/handlers/index.js +18 -2
- package/dist/lib/handlers/index.js.map +1 -1
- package/dist/lib/handlers/ssr/index.js +18 -2
- package/dist/lib/handlers/ssr/index.js.map +1 -1
- package/dist/lib/handlers/ssr/protect.js +24 -17
- package/dist/lib/handlers/ssr/protect.js.map +1 -1
- package/dist/lib/handlers/ssr/wrap.js +10 -6
- package/dist/lib/handlers/ssr/wrap.js.map +1 -1
- package/dist/lib/index.d.ts +1 -1
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/index.js +24 -5
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/utils/billing.js +23 -18
- package/dist/lib/utils/billing.js.map +1 -1
- package/dist/lib/utils/crypto.d.ts +1 -1
- package/dist/lib/utils/crypto.d.ts.map +1 -1
- package/dist/lib/utils/crypto.js +25 -15
- package/dist/lib/utils/crypto.js.map +1 -1
- package/dist/lib/utils/firebase.js +29 -17
- package/dist/lib/utils/firebase.js.map +1 -1
- package/dist/lib/utils/headers.js +13 -6
- package/dist/lib/utils/headers.js.map +1 -1
- package/dist/lib/utils/index.js +24 -8
- package/dist/lib/utils/index.js.map +1 -1
- package/dist/lib/utils/session.js +64 -59
- package/dist/lib/utils/session.js.map +1 -1
- package/dist/lib/utils/shopify-api-js/oauth.js +23 -16
- package/dist/lib/utils/shopify-api-js/oauth.js.map +1 -1
- package/dist/lib/utils/shopify.js +37 -25
- package/dist/lib/utils/shopify.js.map +1 -1
- package/dist/lib/utils/token.js +15 -11
- package/dist/lib/utils/token.js.map +1 -1
- package/dist/plugins/index.d.ts +3 -0
- package/dist/plugins/index.d.ts.map +1 -0
- package/dist/plugins/index.js +19 -0
- package/dist/plugins/index.js.map +1 -0
- package/dist/plugins/types.d.ts +1 -0
- package/dist/plugins/types.d.ts.map +1 -0
- package/dist/plugins/types.js +1 -0
- package/dist/plugins/types.js.map +1 -0
- package/dist/plugins/withShopify.d.ts.map +1 -0
- package/dist/{lib → plugins}/withShopify.js +83 -77
- package/dist/plugins/withShopify.js.map +1 -0
- package/dist/react/hooks/index.js +17 -1
- package/dist/react/hooks/index.js.map +1 -1
- package/dist/react/hooks/useVerification.d.ts +1 -1
- package/dist/react/hooks/useVerification.js +23 -7
- package/dist/react/hooks/useVerification.js.map +1 -1
- package/dist/react/index.d.ts +1 -0
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +18 -1
- package/dist/react/index.js.map +1 -1
- package/dist/runtime/index.js +17 -1
- package/dist/runtime/index.js.map +1 -1
- package/dist/shared/WebCrypto.d.ts +55 -0
- package/dist/shared/WebCrypto.d.ts.map +1 -0
- package/dist/shared/WebCrypto.js +345 -0
- package/dist/shared/WebCrypto.js.map +1 -0
- package/dist/shared/constants.js +15 -11
- package/dist/shared/constants.js.map +1 -1
- package/dist/shared/datetime.js +110 -83
- package/dist/shared/datetime.js.map +1 -1
- package/dist/shared/display.d.ts +0 -2
- package/dist/shared/display.d.ts.map +1 -1
- package/dist/shared/display.js +231 -155
- package/dist/shared/display.js.map +1 -1
- package/dist/shared/errors.js +12 -5
- package/dist/shared/errors.js.map +1 -1
- package/dist/shared/graph.js +14 -11
- package/dist/shared/graph.js.map +1 -1
- package/dist/shared/index.d.ts +2 -1
- package/dist/shared/index.d.ts.map +1 -1
- package/dist/shared/index.js +32 -10
- package/dist/shared/index.js.map +1 -1
- package/dist/shared/match.js +25 -17
- package/dist/shared/match.js.map +1 -1
- package/dist/shared/request.d.ts.map +1 -1
- package/dist/shared/request.js +19 -13
- package/dist/shared/request.js.map +1 -1
- package/dist/shared/shopify.js +31 -21
- package/dist/shared/shopify.js.map +1 -1
- package/dist/shared/uuid.d.ts +3 -0
- package/dist/shared/uuid.d.ts.map +1 -0
- package/dist/shared/uuid.js +10 -0
- package/dist/shared/uuid.js.map +1 -0
- package/dist/shared/verification.d.ts +12 -5
- package/dist/shared/verification.d.ts.map +1 -1
- package/dist/shared/verification.js +34 -23
- package/dist/shared/verification.js.map +1 -1
- package/dist/umd/lib/index.d.ts +1 -1
- package/dist/umd/lib/index.d.ts.map +1 -1
- package/dist/umd/lib/utils/crypto.d.ts +1 -1
- package/dist/umd/lib/utils/crypto.d.ts.map +1 -1
- package/dist/umd/plugins/index.d.ts +3 -0
- package/dist/umd/plugins/index.d.ts.map +1 -0
- package/dist/umd/plugins/types.d.ts +1 -0
- package/dist/umd/plugins/types.d.ts.map +1 -0
- package/dist/umd/plugins/withShopify.d.ts.map +1 -0
- package/dist/umd/react/hooks/useVerification.d.ts +1 -1
- package/dist/umd/react/index.d.ts +1 -0
- package/dist/umd/react/index.d.ts.map +1 -1
- package/dist/umd/shared/WebCrypto.d.ts +55 -0
- package/dist/umd/shared/WebCrypto.d.ts.map +1 -0
- package/dist/umd/shared/display.d.ts +0 -2
- package/dist/umd/shared/display.d.ts.map +1 -1
- package/dist/umd/shared/index.d.ts +2 -1
- package/dist/umd/shared/index.d.ts.map +1 -1
- package/dist/umd/shared/request.d.ts.map +1 -1
- package/dist/umd/shared/uuid.d.ts +3 -0
- package/dist/umd/shared/uuid.d.ts.map +1 -0
- package/dist/umd/shared/verification.d.ts +12 -5
- package/dist/umd/shared/verification.d.ts.map +1 -1
- package/dist/umd/verification/index.d.ts +2 -0
- package/dist/umd/verification/index.d.ts.map +1 -1
- package/dist/umd/verification/utils/errors.d.ts.map +1 -0
- package/dist/umd/verification/utils/index.d.ts +3 -0
- package/dist/umd/verification/utils/index.d.ts.map +1 -0
- package/dist/umd/verification/utils/rawbody.d.ts.map +1 -0
- package/dist/umd/verification/verification.d.ts +3 -1
- package/dist/umd/verification/verification.d.ts.map +1 -1
- package/dist/umd/verification.js +901 -0
- package/dist/umd/verification.js.map +1 -0
- package/dist/verification/index.d.ts +2 -0
- package/dist/verification/index.d.ts.map +1 -1
- package/dist/verification/index.js +19 -1
- package/dist/verification/index.js.map +1 -1
- package/dist/verification/utils/errors.d.ts.map +1 -0
- package/dist/verification/{errors.js → utils/errors.js} +5 -1
- package/dist/verification/utils/errors.js.map +1 -0
- package/dist/verification/utils/index.d.ts +3 -0
- package/dist/verification/utils/index.d.ts.map +1 -0
- package/dist/verification/utils/index.js +19 -0
- package/dist/verification/utils/index.js.map +1 -0
- package/dist/verification/utils/rawbody.d.ts.map +1 -0
- package/dist/verification/utils/rawbody.js +57 -0
- package/dist/verification/utils/rawbody.js.map +1 -0
- package/dist/verification/verification.d.ts +3 -1
- package/dist/verification/verification.d.ts.map +1 -1
- package/dist/verification/verification.js +71 -62
- package/dist/verification/verification.js.map +1 -1
- package/package.json +12 -12
- package/dist/lib/withShopify.d.ts.map +0 -1
- package/dist/lib/withShopify.js.map +0 -1
- package/dist/shared/subtlecrypto.d.ts +0 -41
- package/dist/shared/subtlecrypto.d.ts.map +0 -1
- package/dist/shared/subtlecrypto.js +0 -256
- package/dist/shared/subtlecrypto.js.map +0 -1
- package/dist/umd/lib/withShopify.d.ts.map +0 -1
- package/dist/umd/shared/subtlecrypto.d.ts +0 -41
- package/dist/umd/shared/subtlecrypto.d.ts.map +0 -1
- package/dist/umd/umd-verification.js +0 -968
- package/dist/umd/umd-verification.js.map +0 -1
- package/dist/umd/verification/errors.d.ts.map +0 -1
- package/dist/umd/verification/rawbody.d.ts.map +0 -1
- package/dist/verification/errors.d.ts.map +0 -1
- package/dist/verification/errors.js.map +0 -1
- package/dist/verification/rawbody.d.ts.map +0 -1
- package/dist/verification/rawbody.js +0 -31
- package/dist/verification/rawbody.js.map +0 -1
- package/node_modules/bytes/History.md +0 -97
- package/node_modules/bytes/LICENSE +0 -23
- package/node_modules/bytes/Readme.md +0 -152
- package/node_modules/bytes/index.js +0 -170
- package/node_modules/bytes/package.json +0 -42
- package/node_modules/depd/History.md +0 -103
- package/node_modules/depd/LICENSE +0 -22
- package/node_modules/depd/Readme.md +0 -280
- package/node_modules/depd/index.js +0 -538
- package/node_modules/depd/lib/browser/index.js +0 -77
- package/node_modules/depd/package.json +0 -45
- package/node_modules/http-errors/HISTORY.md +0 -180
- package/node_modules/http-errors/LICENSE +0 -23
- package/node_modules/http-errors/README.md +0 -169
- package/node_modules/http-errors/index.js +0 -289
- package/node_modules/http-errors/package.json +0 -50
- package/node_modules/iconv-lite/Changelog.md +0 -162
- package/node_modules/iconv-lite/LICENSE +0 -21
- package/node_modules/iconv-lite/README.md +0 -156
- package/node_modules/iconv-lite/encodings/dbcs-codec.js +0 -555
- package/node_modules/iconv-lite/encodings/dbcs-data.js +0 -176
- package/node_modules/iconv-lite/encodings/index.js +0 -22
- package/node_modules/iconv-lite/encodings/internal.js +0 -188
- package/node_modules/iconv-lite/encodings/sbcs-codec.js +0 -72
- package/node_modules/iconv-lite/encodings/sbcs-data-generated.js +0 -451
- package/node_modules/iconv-lite/encodings/sbcs-data.js +0 -174
- package/node_modules/iconv-lite/encodings/tables/big5-added.json +0 -122
- package/node_modules/iconv-lite/encodings/tables/cp936.json +0 -264
- package/node_modules/iconv-lite/encodings/tables/cp949.json +0 -273
- package/node_modules/iconv-lite/encodings/tables/cp950.json +0 -177
- package/node_modules/iconv-lite/encodings/tables/eucjp.json +0 -182
- package/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json +0 -1
- package/node_modules/iconv-lite/encodings/tables/gbk-added.json +0 -55
- package/node_modules/iconv-lite/encodings/tables/shiftjis.json +0 -125
- package/node_modules/iconv-lite/encodings/utf16.js +0 -177
- package/node_modules/iconv-lite/encodings/utf7.js +0 -290
- package/node_modules/iconv-lite/lib/bom-handling.js +0 -52
- package/node_modules/iconv-lite/lib/extend-node.js +0 -217
- package/node_modules/iconv-lite/lib/index.d.ts +0 -24
- package/node_modules/iconv-lite/lib/index.js +0 -153
- package/node_modules/iconv-lite/lib/streams.js +0 -121
- package/node_modules/iconv-lite/package.json +0 -46
- package/node_modules/inherits/LICENSE +0 -16
- package/node_modules/inherits/README.md +0 -42
- package/node_modules/inherits/inherits.js +0 -9
- package/node_modules/inherits/inherits_browser.js +0 -27
- package/node_modules/inherits/package.json +0 -29
- package/node_modules/raw-body/HISTORY.md +0 -308
- package/node_modules/raw-body/LICENSE +0 -22
- package/node_modules/raw-body/README.md +0 -223
- package/node_modules/raw-body/SECURITY.md +0 -24
- package/node_modules/raw-body/index.d.ts +0 -87
- package/node_modules/raw-body/index.js +0 -336
- package/node_modules/raw-body/package.json +0 -49
- package/node_modules/safer-buffer/LICENSE +0 -21
- package/node_modules/safer-buffer/Porting-Buffer.md +0 -268
- package/node_modules/safer-buffer/Readme.md +0 -156
- package/node_modules/safer-buffer/dangerous.js +0 -58
- package/node_modules/safer-buffer/package.json +0 -34
- package/node_modules/safer-buffer/safer.js +0 -77
- package/node_modules/safer-buffer/tests.js +0 -406
- package/node_modules/setprototypeof/LICENSE +0 -13
- package/node_modules/setprototypeof/README.md +0 -31
- package/node_modules/setprototypeof/index.d.ts +0 -2
- package/node_modules/setprototypeof/index.js +0 -17
- package/node_modules/setprototypeof/package.json +0 -38
- package/node_modules/setprototypeof/test/index.js +0 -24
- package/node_modules/statuses/HISTORY.md +0 -82
- package/node_modules/statuses/LICENSE +0 -23
- package/node_modules/statuses/README.md +0 -136
- package/node_modules/statuses/codes.json +0 -65
- package/node_modules/statuses/index.js +0 -146
- package/node_modules/statuses/package.json +0 -49
- package/node_modules/toidentifier/HISTORY.md +0 -9
- package/node_modules/toidentifier/LICENSE +0 -21
- package/node_modules/toidentifier/README.md +0 -61
- package/node_modules/toidentifier/index.js +0 -32
- package/node_modules/toidentifier/package.json +0 -38
- package/node_modules/unpipe/HISTORY.md +0 -4
- package/node_modules/unpipe/LICENSE +0 -22
- package/node_modules/unpipe/README.md +0 -43
- package/node_modules/unpipe/index.js +0 -69
- package/node_modules/unpipe/package.json +0 -27
- /package/dist/{lib → plugins}/withShopify.d.ts +0 -0
- /package/dist/umd/{lib → plugins}/withShopify.d.ts +0 -0
- /package/dist/umd/verification/{errors.d.ts → utils/errors.d.ts} +0 -0
- /package/dist/umd/verification/{rawbody.d.ts → utils/rawbody.d.ts} +0 -0
- /package/dist/verification/{errors.d.ts → utils/errors.d.ts} +0 -0
- /package/dist/verification/{rawbody.d.ts → utils/rawbody.d.ts} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uuid.d.ts","sourceRoot":"","sources":["../../src/shared/uuid.js"],"names":[],"mappings":"AAIO,+BAEN;AAEM,kCAEN"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getInteger = exports.getGUID = void 0;
|
|
4
|
+
const uuid_1 = require("uuid");
|
|
5
|
+
// #endregion lib-utils-js
|
|
6
|
+
const getGUID = () => ((0, uuid_1.v4)());
|
|
7
|
+
exports.getGUID = getGUID;
|
|
8
|
+
const getInteger = () => ((0, exports.getGUID)().replace(/\D/g, ''));
|
|
9
|
+
exports.getInteger = getInteger;
|
|
10
|
+
//# sourceMappingURL=uuid.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uuid.js","sourceRoot":"","sources":["../../src/shared/uuid.js"],"names":[],"mappings":";;;AAAA,+BAAmC;AAEnC,0BAA0B;AAEnB,MAAM,OAAO,GAAG,GAAG,EAAE,CAAC,CAC3B,IAAA,SAAM,GAAE,CACT,CAAA;AAFY,QAAA,OAAO,WAEnB;AAEM,MAAM,UAAU,GAAG,GAAG,EAAE,CAAC,CAC9B,IAAA,eAAO,GAAE,CAAC,OAAO,CAAC,KAAK,EAAC,EAAE,CAAC,CAC5B,CAAA;AAFY,QAAA,UAAU,cAEtB"}
|
|
@@ -1,24 +1,31 @@
|
|
|
1
|
-
export function getKeysData(publicKey: any
|
|
1
|
+
export function getKeysData(publicKey: any, { crypto: _crypto, util: _util }?: {
|
|
2
|
+
crypto: any;
|
|
3
|
+
util: any;
|
|
4
|
+
}): Promise<{
|
|
2
5
|
publicKey: any;
|
|
3
6
|
ephemeral: {};
|
|
4
7
|
verification: {
|
|
5
8
|
derivedSecretKey?: undefined;
|
|
6
9
|
derivedHMACKey?: undefined;
|
|
7
10
|
} | {
|
|
8
|
-
derivedSecretKey:
|
|
9
|
-
derivedHMACKey:
|
|
11
|
+
derivedSecretKey: any;
|
|
12
|
+
derivedHMACKey: any;
|
|
10
13
|
};
|
|
11
14
|
}>;
|
|
12
|
-
export function prepareVerificationRequest({ keysData: _keysData, disableRecryption: _disableRecryption }?: {
|
|
15
|
+
export function prepareVerificationRequest({ keysData: _keysData, disableRecryption: _disableRecryption, crypto: _crypto, util: _util }?: {
|
|
13
16
|
keysData: any;
|
|
14
17
|
disableRecryption: any;
|
|
18
|
+
crypto: any;
|
|
19
|
+
util: any;
|
|
15
20
|
}): (requestPath: any, { method: rawMethod, body: rawBody, headers: rawHeaders, ...requestOptions }?: {
|
|
16
21
|
method: any;
|
|
17
22
|
body: any;
|
|
18
23
|
headers: any;
|
|
19
24
|
}) => Promise<any[] | undefined>;
|
|
20
|
-
export function processVerificationResponse({ keysData, disableRecryption: _disableRecryption }?: {
|
|
25
|
+
export function processVerificationResponse({ keysData, disableRecryption: _disableRecryption, crypto: _crypto, util: _util }?: {
|
|
21
26
|
keysData: any;
|
|
22
27
|
disableRecryption: any;
|
|
28
|
+
crypto: any;
|
|
29
|
+
util: any;
|
|
23
30
|
}): (encryptedResponse: any, _derivedSecretKey: any) => Promise<any>;
|
|
24
31
|
//# sourceMappingURL=verification.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verification.d.ts","sourceRoot":"","sources":["../../src/shared/verification.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"verification.d.ts","sourceRoot":"","sources":["../../src/shared/verification.js"],"names":[],"mappings":"AAKO;;;;;;;;;;;;;GAiBN;AAGM;;;;;;;;;iCAkEN;AAEM;;;;;qEAaN"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -18,14 +19,19 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
18
19
|
}
|
|
19
20
|
return t;
|
|
20
21
|
};
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
22
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
23
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.processVerificationResponse = exports.prepareVerificationRequest = exports.getKeysData = void 0;
|
|
27
|
+
const request_1 = require("./request");
|
|
28
|
+
const display_1 = require("./display");
|
|
29
|
+
const datetime_1 = require("./datetime");
|
|
30
|
+
const WebCrypto_1 = __importDefault(require("./WebCrypto"));
|
|
31
|
+
const getKeysData = (publicKey, { crypto: _crypto, util: _util } = {}) => __awaiter(void 0, void 0, void 0, function* () {
|
|
32
|
+
const webCrypto = new WebCrypto_1.default({ crypto: _crypto, util: _util });
|
|
33
|
+
const _ephemeralStoreableKeyPair = yield webCrypto.getStorableKeyPair(yield webCrypto.generateKeyPair(publicKey));
|
|
34
|
+
const _verificationKeyPair = yield webCrypto.getVerificationKeys({
|
|
29
35
|
publicKey,
|
|
30
36
|
privateKey: _ephemeralStoreableKeyPair.privateKey,
|
|
31
37
|
});
|
|
@@ -35,17 +41,19 @@ export const getKeysData = (publicKey) => __awaiter(void 0, void 0, void 0, func
|
|
|
35
41
|
verification: _verificationKeyPair,
|
|
36
42
|
};
|
|
37
43
|
});
|
|
44
|
+
exports.getKeysData = getKeysData;
|
|
38
45
|
// eslint-disable-next-line arrow-body-style
|
|
39
|
-
|
|
40
|
-
const
|
|
46
|
+
const prepareVerificationRequest = ({ keysData: _keysData, disableRecryption: _disableRecryption, crypto: _crypto, util: _util } = {}) => {
|
|
47
|
+
const webCrypto = new WebCrypto_1.default({ crypto: _crypto, util: _util });
|
|
48
|
+
const disableRecryption = (0, display_1.isTrue)(_disableRecryption);
|
|
41
49
|
return (requestPath, _a = {}) => __awaiter(void 0, void 0, void 0, function* () {
|
|
42
50
|
var { method: rawMethod, body: rawBody, headers: rawHeaders } = _a, requestOptions = __rest(_a, ["method", "body", "headers"]);
|
|
43
|
-
let parsedBody = safeParse(rawBody);
|
|
44
|
-
const method = getRequestMethod(parsedBody, rawMethod);
|
|
45
|
-
if (disableRecryption || stringEmpty(_keysData === null || _keysData === void 0 ? void 0 : _keysData.publicKey)) {
|
|
51
|
+
let parsedBody = (0, display_1.safeParse)(rawBody);
|
|
52
|
+
const method = (0, request_1.getRequestMethod)(parsedBody, rawMethod);
|
|
53
|
+
if (disableRecryption || (0, display_1.stringEmpty)(_keysData === null || _keysData === void 0 ? void 0 : _keysData.publicKey)) {
|
|
46
54
|
return [
|
|
47
55
|
requestPath,
|
|
48
|
-
prepareRequestOptions(Object.assign({ method, body: parsedBody, headers: rawHeaders }, requestOptions), requestPath)
|
|
56
|
+
(0, request_1.prepareRequestOptions)(Object.assign({ method, body: parsedBody, headers: rawHeaders }, requestOptions), requestPath)
|
|
49
57
|
];
|
|
50
58
|
}
|
|
51
59
|
const { verification: { derivedHMACKey, derivedSecretKey, } = {}, ephemeral: { publicKey: ephemeralPublicKey, } = {}, } = _keysData !== null && _keysData !== void 0 ? _keysData : {};
|
|
@@ -53,28 +61,31 @@ export const prepareVerificationRequest = ({ keysData: _keysData, disableRecrypt
|
|
|
53
61
|
return undefined;
|
|
54
62
|
}
|
|
55
63
|
if (parsedBody && derivedSecretKey) {
|
|
56
|
-
parsedBody = yield
|
|
64
|
+
parsedBody = yield webCrypto.encryptMessage(JSON.stringify(parsedBody), derivedSecretKey);
|
|
57
65
|
}
|
|
58
|
-
const timestamp = toUnixString();
|
|
59
|
-
const computedHMAC = yield
|
|
60
|
-
timestamp }, normalizeURIParts(requestPath))), derivedHMACKey);
|
|
66
|
+
const timestamp = (0, datetime_1.toUnixString)();
|
|
67
|
+
const computedHMAC = yield webCrypto.generateHMAC((0, display_1.objectToSortedString)(Object.assign({ body: parsedBody, method,
|
|
68
|
+
timestamp }, (0, request_1.normalizeURIParts)(requestPath))), derivedHMACKey);
|
|
61
69
|
return [
|
|
62
70
|
requestPath,
|
|
63
|
-
prepareRequestOptions(Object.assign({ method, body: parsedBody, headers: Object.assign({ 'X-Authorization': `HMAC-SHA256 ${computedHMAC}`, 'X-Authorization-Timestamp': timestamp, 'X-Ephemeral-Key': ephemeralPublicKey, 'X-Public-Key': _keysData.publicKey }, rawHeaders) }, requestOptions), requestPath),
|
|
71
|
+
(0, request_1.prepareRequestOptions)(Object.assign({ method, body: parsedBody, headers: Object.assign({ 'X-Authorization': `HMAC-SHA256 ${computedHMAC}`, 'X-Authorization-Timestamp': timestamp, 'X-Ephemeral-Key': ephemeralPublicKey, 'X-Public-Key': _keysData.publicKey }, rawHeaders) }, requestOptions), requestPath),
|
|
64
72
|
derivedSecretKey
|
|
65
73
|
];
|
|
66
74
|
});
|
|
67
75
|
};
|
|
68
|
-
|
|
69
|
-
|
|
76
|
+
exports.prepareVerificationRequest = prepareVerificationRequest;
|
|
77
|
+
const processVerificationResponse = ({ keysData, disableRecryption: _disableRecryption, crypto: _crypto, util: _util } = {}) => {
|
|
78
|
+
const webCrypto = new WebCrypto_1.default({ crypto: _crypto, util: _util });
|
|
79
|
+
const disableRecryption = (0, display_1.isTrue)(_disableRecryption);
|
|
70
80
|
return (encryptedResponse, _derivedSecretKey) => __awaiter(void 0, void 0, void 0, function* () {
|
|
71
81
|
var _a;
|
|
72
82
|
const derivedSecretKey = _derivedSecretKey !== null && _derivedSecretKey !== void 0 ? _derivedSecretKey : (_a = keysData.verification) === null || _a === void 0 ? void 0 : _a.derivedSecretKey;
|
|
73
83
|
if (disableRecryption || !encryptedResponse || !derivedSecretKey) {
|
|
74
84
|
return encryptedResponse;
|
|
75
85
|
}
|
|
76
|
-
const decryptedMessage = yield
|
|
77
|
-
return safeParse(decryptedMessage);
|
|
86
|
+
const decryptedMessage = yield webCrypto.decryptMessage(encryptedResponse, derivedSecretKey);
|
|
87
|
+
return (0, display_1.safeParse)(decryptedMessage);
|
|
78
88
|
});
|
|
79
89
|
};
|
|
90
|
+
exports.processVerificationResponse = processVerificationResponse;
|
|
80
91
|
//# sourceMappingURL=verification.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verification.js","sourceRoot":"","sources":["../../src/shared/verification.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"verification.js","sourceRoot":"","sources":["../../src/shared/verification.js"],"names":[],"mappings":"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"}
|
package/dist/umd/lib/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,iBAAiB,CAAA;AAC/B,cAAc,YAAY,CAAA;AAC1B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,iBAAiB,CAAA;AAC/B,cAAc,YAAY,CAAA;AAC1B,cAAc,YAAY,CAAA;AAC1B,OAAO,EACL,iBAAiB,EACjB,cAAc,EACf,MAAM,SAAS,CAAA"}
|
|
@@ -16,7 +16,7 @@ export class CryptoHandler {
|
|
|
16
16
|
verifyPublicKey(encryptedPublicKey: any, sharedSecret: any): boolean;
|
|
17
17
|
[singleton]: CryptoHandler | undefined;
|
|
18
18
|
}
|
|
19
|
-
export function getNonce(length?: number):
|
|
19
|
+
export function getNonce(length?: number): any;
|
|
20
20
|
declare const singleton: unique symbol;
|
|
21
21
|
export {};
|
|
22
22
|
//# sourceMappingURL=crypto.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"crypto.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/crypto.js"],"names":[],"mappings":"AA2CO,6FAIN;AAEM,8FAgBN;AAkBD;IA8BE,qCAUC;IAvCD,wCAOC;IAFC,aAA2B;IAC3B,YAAoB;IAGtB,6BAEC;IAED,mBAcC;IAVG;;;kBAQC;IAgBL,6BAEC;IAED,gCAEC;IAED,qEAWC;IA7BG,uCAA8D;CA8BnE;AAGM
|
|
1
|
+
{"version":3,"file":"crypto.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/crypto.js"],"names":[],"mappings":"AA2CO,6FAIN;AAEM,8FAgBN;AAkBD;IA8BE,qCAUC;IAvCD,wCAOC;IAFC,aAA2B;IAC3B,YAAoB;IAGtB,6BAEC;IAED,mBAcC;IAVG;;;kBAQC;IAgBL,6BAEC;IAED,gCAEC;IAED,qEAWC;IA7BG,uCAA8D;CA8BnE;AAGM,+CAON;AAxFD,uCAAqC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/plugins/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,cAAc,qBAAqB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/plugins/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"withShopify.d.ts","sourceRoot":"","sources":["../../src/plugins/withShopify.js"],"names":[],"mappings":"AA0BO;;;;iBAmZN"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/react/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/react/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA;AACnC,cAAc,SAAS,CAAA"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export default WebCrypto;
|
|
2
|
+
declare class WebCrypto {
|
|
3
|
+
constructor({ crypto: _crypto, util: _util }?: {
|
|
4
|
+
crypto: any;
|
|
5
|
+
util: any;
|
|
6
|
+
});
|
|
7
|
+
_crypto: any;
|
|
8
|
+
_util: any;
|
|
9
|
+
get subtle(): any;
|
|
10
|
+
getWebCrypto(): Promise<any>;
|
|
11
|
+
getTextDecoder(): Promise<any>;
|
|
12
|
+
getTextEncoder(): Promise<any>;
|
|
13
|
+
timingSafeEqual(value1: any, value2: any): boolean;
|
|
14
|
+
stringToHex(stringValue: any): string;
|
|
15
|
+
hexToString(hexValue: any): string;
|
|
16
|
+
arrayBufferToString(arrayBuffer: any): Promise<any>;
|
|
17
|
+
arrayToArrayBuffer(array: any): any;
|
|
18
|
+
ensureArrayBuffer(arrayOrArrayBuffer: any): any;
|
|
19
|
+
generateKeyPair(): Promise<any>;
|
|
20
|
+
getKeyOperations(keyType: any): string[];
|
|
21
|
+
getKeyAlgorythm(keyType: any): {
|
|
22
|
+
name: string;
|
|
23
|
+
namedCurve?: undefined;
|
|
24
|
+
} | {
|
|
25
|
+
name: string;
|
|
26
|
+
namedCurve: string;
|
|
27
|
+
};
|
|
28
|
+
generateHMAC(message: any, derivedKey: any): Promise<string | undefined>;
|
|
29
|
+
verifyHMAC(message: any, derivedKey: any, verifiableHMAC: any): Promise<boolean>;
|
|
30
|
+
getStorableKey(key: any): Promise<string>;
|
|
31
|
+
restoreStorableKey(keyType: any, storableHex: any): Promise<any>;
|
|
32
|
+
getStorableKeyPair(keyPair: any): Promise<{}>;
|
|
33
|
+
restoreStorableKeyPair(keyPair: any): Promise<{}>;
|
|
34
|
+
deriveSharedKey({ publicKey, privateKey }: {
|
|
35
|
+
publicKey: any;
|
|
36
|
+
privateKey: any;
|
|
37
|
+
}): Promise<any>;
|
|
38
|
+
deriveHMACKey({ publicKey, privateKey }: {
|
|
39
|
+
publicKey: any;
|
|
40
|
+
privateKey: any;
|
|
41
|
+
}): Promise<any>;
|
|
42
|
+
getVerificationKeys({ publicKey, privateKey }: {
|
|
43
|
+
publicKey: any;
|
|
44
|
+
privateKey: any;
|
|
45
|
+
}): Promise<{
|
|
46
|
+
derivedSecretKey?: undefined;
|
|
47
|
+
derivedHMACKey?: undefined;
|
|
48
|
+
} | {
|
|
49
|
+
derivedSecretKey: any;
|
|
50
|
+
derivedHMACKey: any;
|
|
51
|
+
}>;
|
|
52
|
+
encryptMessage(decryptedMessage: any, derivedKey: any): Promise<number[] | undefined>;
|
|
53
|
+
decryptMessage(encryptedMessage: any, derivedKey: any): Promise<any>;
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=WebCrypto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WebCrypto.d.ts","sourceRoot":"","sources":["../../src/shared/WebCrypto.js"],"names":[],"mappings":";AAIA;IACE;;;OAGC;IAFC,aAAsB;IACtB,WAAkB;IAGpB,kBAEC;IAED,6BAoBC;IAED,+BAmBC;IAED,+BAmBC;IAED,mDAiBC;IAED,sCAMC;IAED,mCAQC;IAED,oDAIC;IAED,oCAMC;IAED,gDAMC;IAED,gCAYC;IAED,yCAiBC;IAED;;;;;;MAmBC;IAED,yEAiBC;IAED,iFAIC;IAED,0CAKC;IAED,iEAkBC;IAED,8CAUC;IAED,kDAUC;IAED;;;qBAoBC;IAED;;;qBAqBC;IAED;;;;;;;;;OAaC;IAED,sFAuBC;IAED,qEAuBC;CACF"}
|
|
@@ -97,6 +97,4 @@ export function querystringToObject(queryString: any): {
|
|
|
97
97
|
export function arrayIncludesAll(_values: any, comparison: any): boolean;
|
|
98
98
|
export function arraysMatch(array1: any, array2: any): boolean;
|
|
99
99
|
export function appendQuery(_basePath: any, queryString: any): string;
|
|
100
|
-
export function getGUID(): any;
|
|
101
|
-
export function getInteger(): any;
|
|
102
100
|
//# sourceMappingURL=display.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"display.d.ts","sourceRoot":"","sources":["../../src/shared/display.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"display.d.ts","sourceRoot":"","sources":["../../src/shared/display.js"],"names":[],"mappings":"AAIO;;;;;EAmCN;AAEM,2DAGN;AAEM,4DAeN;AAEM,gEAmBN;AAEM,mDAEN;AAEM,6CAGN;AAEM,2CAGN;AAEM,uDAGN;AAEM,+DAwBN;AAEM,0CAON;AAEM,sDAeN;AAEM,kDAEN;AAGM,sDAGN;AAEM,uDAGN;AAEM,uDAGN;AAEM,wDAGN;AAEM,mDAIN;AAEM,wDAIN;AAGM,mDAEN;AAEM,uDAEN;AAGM,4DAEN;AAEM;;;WAQN;AAEM,kDAGN;AAEM,uDAEN;AAEM,8EAGN;AAEM,iFAGN;AAEM,qFAEN;AAEM,+CAEN;AAGM,kDAEN;AAEM,qDAEN;AAEM,2CAIN;AAEM,6DAEN;AAOM,0FAqBN;AAMM,6DAGN;AAEM,0DAEN;AAEM,yDAGN;AAEM,sDAEN;AAOM,0EAEN;AAEM,kEAUN;AAEM,6EAEN;AAEM,8EAKN;AAEM,yCAEN;AAEM,0EAEN;AAEM,sEAIN;AAgBM,gEAQN;AAEM,2CAEN;AAEM,sEAEN;AAEM,4CAEN;AAEM,uEAEN;AAEM,+CAEN;AAEM,sEAIN;AAEM,6CAEN;AAEM,gDAGN;AAEM,+CASN;AAEM,gEA6DN;AAEM,wDAEN;AAEM,iEAEN;AAGM,yDAEN;AAEM,gEAEN;AAEM,wDAEN;AAEM,yDAEN;AAEM,kEAQN;AAEM,yEAON;AAEM,+CAWN;AAEM,kDAUN;AAEM,oEAON;AAEM,6DAKN;AAEM,wDAGN;AAGM,wEASN;AAEM,+DAcN;AAEM;;;;;EAWN;AAEM;;;;;;;;KAkBN;AAMM;;EAON;AAEM,yEAKN;AAEM,+DAEN;AAEM,sEAMN"}
|
|
@@ -6,6 +6,7 @@ export * from './graph';
|
|
|
6
6
|
export * from './match';
|
|
7
7
|
export * from './request';
|
|
8
8
|
export * from './shopify';
|
|
9
|
-
export * from './
|
|
9
|
+
export * from './uuid';
|
|
10
10
|
export * from './verification';
|
|
11
|
+
export { default as WebCrypto } from './WebCrypto';
|
|
11
12
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/shared/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA;AACvB,cAAc,WAAW,CAAA;AACzB,cAAc,WAAW,CAAA;AACzB,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/shared/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA;AACvB,cAAc,WAAW,CAAA;AACzB,cAAc,WAAW,CAAA;AACzB,cAAc,QAAQ,CAAA;AACtB,cAAc,gBAAgB,CAAA;AAC9B,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../src/shared/request.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../src/shared/request.js"],"names":[],"mappings":"AAUA,iDAAiD;;;;AAK1C,kEAIN;AAEM;;;;QAmBN;AAgBM;;;;cAeN"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uuid.d.ts","sourceRoot":"","sources":["../../src/shared/uuid.js"],"names":[],"mappings":"AAIO,+BAEN;AAEM,kCAEN"}
|
|
@@ -1,24 +1,31 @@
|
|
|
1
|
-
export function getKeysData(publicKey: any
|
|
1
|
+
export function getKeysData(publicKey: any, { crypto: _crypto, util: _util }?: {
|
|
2
|
+
crypto: any;
|
|
3
|
+
util: any;
|
|
4
|
+
}): Promise<{
|
|
2
5
|
publicKey: any;
|
|
3
6
|
ephemeral: {};
|
|
4
7
|
verification: {
|
|
5
8
|
derivedSecretKey?: undefined;
|
|
6
9
|
derivedHMACKey?: undefined;
|
|
7
10
|
} | {
|
|
8
|
-
derivedSecretKey:
|
|
9
|
-
derivedHMACKey:
|
|
11
|
+
derivedSecretKey: any;
|
|
12
|
+
derivedHMACKey: any;
|
|
10
13
|
};
|
|
11
14
|
}>;
|
|
12
|
-
export function prepareVerificationRequest({ keysData: _keysData, disableRecryption: _disableRecryption }?: {
|
|
15
|
+
export function prepareVerificationRequest({ keysData: _keysData, disableRecryption: _disableRecryption, crypto: _crypto, util: _util }?: {
|
|
13
16
|
keysData: any;
|
|
14
17
|
disableRecryption: any;
|
|
18
|
+
crypto: any;
|
|
19
|
+
util: any;
|
|
15
20
|
}): (requestPath: any, { method: rawMethod, body: rawBody, headers: rawHeaders, ...requestOptions }?: {
|
|
16
21
|
method: any;
|
|
17
22
|
body: any;
|
|
18
23
|
headers: any;
|
|
19
24
|
}) => Promise<any[] | undefined>;
|
|
20
|
-
export function processVerificationResponse({ keysData, disableRecryption: _disableRecryption }?: {
|
|
25
|
+
export function processVerificationResponse({ keysData, disableRecryption: _disableRecryption, crypto: _crypto, util: _util }?: {
|
|
21
26
|
keysData: any;
|
|
22
27
|
disableRecryption: any;
|
|
28
|
+
crypto: any;
|
|
29
|
+
util: any;
|
|
23
30
|
}): (encryptedResponse: any, _derivedSecretKey: any) => Promise<any>;
|
|
24
31
|
//# sourceMappingURL=verification.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verification.d.ts","sourceRoot":"","sources":["../../src/shared/verification.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"verification.d.ts","sourceRoot":"","sources":["../../src/shared/verification.js"],"names":[],"mappings":"AAKO;;;;;;;;;;;;;GAiBN;AAGM;;;;;;;;;iCAkEN;AAEM;;;;;qEAaN"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/verification/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/verification/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA;AACnC,cAAc,SAAS,CAAA;AACvB,cAAc,gBAAgB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/verification/utils/errors.js"],"names":[],"mappings":"AAAA;IACE,sCAOC;IAJC,UAAgB;IAChB,UAAgB;CAInB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/verification/utils/index.js"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rawbody.d.ts","sourceRoot":"","sources":["../../../src/verification/utils/rawbody.js"],"names":[],"mappings":"AAoBO,sDAQN"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
export function getVerificationHelpers({ keyPairs
|
|
1
|
+
export function getVerificationHelpers({ keyPairs, crypto: _crypto, util: _util }?: {
|
|
2
2
|
keyPairs: any;
|
|
3
|
+
crypto: any;
|
|
4
|
+
util: any;
|
|
3
5
|
}): (req: any, params: any) => Promise<{
|
|
4
6
|
rawBody: any;
|
|
5
7
|
requestBody: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verification.d.ts","sourceRoot":"","sources":["../../src/verification/verification.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"verification.d.ts","sourceRoot":"","sources":["../../src/verification/verification.js"],"names":[],"mappings":"AAgBO;;;;;;;;GA6FN"}
|