@shopify/shopify-api 14.0.0 → 14.0.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.
@@ -14,6 +14,65 @@ function getUserAgent(config) {
14
14
  }
15
15
  return userAgentPrefix;
16
16
  }
17
+ const REDACTED_LOG_VALUE = '****';
18
+ // These headers carry reusable credentials and must not reach the logs.
19
+ const SENSITIVE_LOG_HEADERS = new Set([
20
+ 'authorization',
21
+ 'cookie',
22
+ 'set-cookie',
23
+ 'shopify-storefront-private-token',
24
+ 'x-shopify-access-token',
25
+ 'x-shopify-storefront-access-token',
26
+ ]);
27
+ function sanitizeHeaderValue(name, value) {
28
+ return SENSITIVE_LOG_HEADERS.has(name.toLowerCase())
29
+ ? REDACTED_LOG_VALUE
30
+ : value;
31
+ }
32
+ // Keep the original serialized shape of request headers. A Headers instance
33
+ // has no own enumerable properties, so it stays opaque here, the same as
34
+ // JSON.stringify shows it.
35
+ function sanitizeHeaders(headers) {
36
+ if (!headers || typeof headers !== 'object') {
37
+ return headers;
38
+ }
39
+ if (Array.isArray(headers)) {
40
+ return headers.map((header) => Array.isArray(header)
41
+ ? [header[0], sanitizeHeaderValue(header[0], header[1])]
42
+ : header);
43
+ }
44
+ return Object.fromEntries(Object.entries(headers).map(([name, value]) => [
45
+ name,
46
+ sanitizeHeaderValue(name, value),
47
+ ]));
48
+ }
49
+ // Response headers were always enumerated in the log, so keep that and
50
+ // redact the credential values.
51
+ function sanitizeEnumerableHeaders(headers) {
52
+ if (typeof headers?.entries === 'function' && !Array.isArray(headers)) {
53
+ return Object.fromEntries([...headers.entries()].map(([name, value]) => [
54
+ name,
55
+ sanitizeHeaderValue(name, value),
56
+ ]));
57
+ }
58
+ return sanitizeHeaders(headers);
59
+ }
60
+ function sanitizeRequestParams(requestParams) {
61
+ if (Array.isArray(requestParams)) {
62
+ return requestParams.map((param) => param && typeof param === 'object' && 'headers' in param
63
+ ? { ...param, headers: sanitizeHeaders(param.headers) }
64
+ : param);
65
+ }
66
+ if (requestParams &&
67
+ typeof requestParams === 'object' &&
68
+ 'headers' in requestParams) {
69
+ return {
70
+ ...requestParams,
71
+ headers: sanitizeHeaders(requestParams.headers),
72
+ };
73
+ }
74
+ return requestParams;
75
+ }
17
76
  function serializeResponse(response) {
18
77
  if (!response) {
19
78
  return { error: 'No response object provided' };
@@ -28,11 +87,8 @@ function serializeResponse(response) {
28
87
  type,
29
88
  url,
30
89
  };
31
- if (headers?.entries) {
32
- serialized.headers = Object.fromEntries(headers.entries());
33
- }
34
- else if (headers) {
35
- serialized.headers = headers;
90
+ if (headers) {
91
+ serialized.headers = sanitizeEnumerableHeaders(headers);
36
92
  }
37
93
  return serialized;
38
94
  }
@@ -47,7 +103,7 @@ function clientLoggerFactory(config) {
47
103
  case 'HTTP-Response': {
48
104
  const responseLog = logContent.content;
49
105
  index.logger(config).debug('Received response for HTTP request', {
50
- requestParams: JSON.stringify(responseLog.requestParams),
106
+ requestParams: JSON.stringify(sanitizeRequestParams(responseLog.requestParams)),
51
107
  response: JSON.stringify(serializeResponse(responseLog.response)),
52
108
  });
53
109
  break;
@@ -55,7 +111,7 @@ function clientLoggerFactory(config) {
55
111
  case 'HTTP-Retry': {
56
112
  const responseLog = logContent.content;
57
113
  index.logger(config).debug('Retrying HTTP request', {
58
- requestParams: JSON.stringify(responseLog.requestParams),
114
+ requestParams: JSON.stringify(sanitizeRequestParams(responseLog.requestParams)),
59
115
  retryAttempt: responseLog.retryAttempt,
60
116
  maxRetries: responseLog.maxRetries,
61
117
  response: responseLog.lastResponse
@@ -67,7 +123,7 @@ function clientLoggerFactory(config) {
67
123
  case 'HTTP-Response-GraphQL-Deprecation-Notice': {
68
124
  const responseLog = logContent.content;
69
125
  index.logger(config).debug('Received response containing Deprecated GraphQL Notice', {
70
- requestParams: JSON.stringify(responseLog.requestParams),
126
+ requestParams: JSON.stringify(sanitizeRequestParams(responseLog.requestParams)),
71
127
  deprecationNotice: responseLog.deprecationNotice,
72
128
  });
73
129
  break;
@@ -1 +1 @@
1
- {"version":3,"file":"common.js","sources":["../../../../../../lib/clients/common.ts"],"sourcesContent":["import {\n HTTPResponseLog,\n HTTPRetryLog,\n HTTPResponseGraphQLDeprecationNotice,\n LogContent,\n} from '@shopify/admin-api-client';\n\nimport * as ShopifyErrors from '../error';\nimport {LIBRARY_NAME, StatusCode} from '../types';\nimport {ConfigInterface} from '../base-types';\nimport {SHOPIFY_API_LIBRARY_VERSION} from '../version';\nimport {\n abstractRuntimeString,\n canonicalizeHeaders,\n getHeader,\n} from '../../runtime';\nimport {logger} from '../logger';\n\nexport function getUserAgent(config: ConfigInterface): string {\n let userAgentPrefix = `${LIBRARY_NAME} v${SHOPIFY_API_LIBRARY_VERSION} | ${abstractRuntimeString()}`;\n if (config.userAgentPrefix) {\n userAgentPrefix = `${config.userAgentPrefix} | ${userAgentPrefix}`;\n }\n\n return userAgentPrefix;\n}\n\nfunction serializeResponse(response: Response | any) {\n if (!response) {\n return {error: 'No response object provided'};\n }\n\n try {\n const {status, statusText, ok, redirected, type, url, headers} = response;\n\n const serialized: any = {\n status,\n statusText,\n ok,\n redirected,\n type,\n url,\n };\n\n if (headers?.entries) {\n serialized.headers = Object.fromEntries(headers.entries());\n } else if (headers) {\n serialized.headers = headers;\n }\n\n return serialized;\n } catch {\n return response;\n }\n}\n\nexport function clientLoggerFactory(config: ConfigInterface) {\n return (logContent: LogContent) => {\n if (config.logger.httpRequests) {\n switch (logContent.type) {\n case 'HTTP-Response': {\n const responseLog: HTTPResponseLog['content'] = logContent.content;\n logger(config).debug('Received response for HTTP request', {\n requestParams: JSON.stringify(responseLog.requestParams),\n response: JSON.stringify(serializeResponse(responseLog.response)),\n });\n break;\n }\n case 'HTTP-Retry': {\n const responseLog: HTTPRetryLog['content'] = logContent.content;\n logger(config).debug('Retrying HTTP request', {\n requestParams: JSON.stringify(responseLog.requestParams),\n retryAttempt: responseLog.retryAttempt,\n maxRetries: responseLog.maxRetries,\n response: responseLog.lastResponse\n ? JSON.stringify(serializeResponse(responseLog.lastResponse))\n : 'undefined',\n });\n break;\n }\n case 'HTTP-Response-GraphQL-Deprecation-Notice': {\n const responseLog: HTTPResponseGraphQLDeprecationNotice['content'] =\n logContent.content;\n logger(config).debug(\n 'Received response containing Deprecated GraphQL Notice',\n {\n requestParams: JSON.stringify(responseLog.requestParams),\n deprecationNotice: responseLog.deprecationNotice,\n },\n );\n break;\n }\n default: {\n logger(config).debug(`HTTP request event: ${logContent.content}`);\n break;\n }\n }\n }\n };\n}\n\nexport function throwFailedRequest(\n body: any,\n atMaxRetries: boolean,\n response?: Response,\n): never {\n if (typeof response === 'undefined') {\n const message = body?.errors?.message ?? '';\n throw new ShopifyErrors.HttpRequestError(\n `Http request error, no response available: ${message}`,\n );\n }\n\n const responseHeaders = canonicalizeHeaders(\n Object.fromEntries(response.headers.entries() ?? []),\n );\n\n if (response.status === StatusCode.Ok && body.errors.graphQLErrors) {\n throw new ShopifyErrors.GraphqlQueryError({\n message:\n body.errors.graphQLErrors?.[0].message ?? 'GraphQL operation failed',\n response: response as Record<string, any>,\n headers: responseHeaders,\n body: body as Record<string, any>,\n });\n }\n\n const errorMessages: string[] = [];\n if (body.errors) {\n errorMessages.push(JSON.stringify(body.errors, null, 2));\n }\n const xRequestId = getHeader(responseHeaders, 'x-request-id');\n if (xRequestId) {\n errorMessages.push(\n `If you report this error, please include this id: ${xRequestId}`,\n );\n }\n\n const errorMessage = errorMessages.length\n ? `:\\n${errorMessages.join('\\n')}`\n : '';\n const code = response.status;\n const statusText = response.statusText;\n\n switch (true) {\n case response.status === StatusCode.TooManyRequests: {\n if (atMaxRetries) {\n throw new ShopifyErrors.HttpMaxRetriesError(\n 'Attempted the maximum number of retries for HTTP request.',\n );\n } else {\n const retryAfter = getHeader(responseHeaders, 'Retry-After');\n throw new ShopifyErrors.HttpThrottlingError({\n message: `Shopify is throttling requests ${errorMessage}`,\n code,\n statusText,\n body,\n headers: responseHeaders,\n retryAfter: retryAfter ? parseFloat(retryAfter) : undefined,\n });\n }\n }\n case response.status >= StatusCode.InternalServerError:\n if (atMaxRetries) {\n throw new ShopifyErrors.HttpMaxRetriesError(\n 'Attempted the maximum number of retries for HTTP request.',\n );\n } else {\n throw new ShopifyErrors.HttpInternalError({\n message: `Shopify internal error${errorMessage}`,\n code,\n statusText,\n body,\n headers: responseHeaders,\n });\n }\n default:\n throw new ShopifyErrors.HttpResponseError({\n message: `Received an error response (${response.status} ${response.statusText}) from Shopify${errorMessage}`,\n code,\n statusText,\n body,\n headers: responseHeaders,\n });\n }\n}\n"],"names":["LIBRARY_NAME","SHOPIFY_API_LIBRARY_VERSION","abstractRuntimeString","logger","ShopifyErrors.HttpRequestError","canonicalizeHeaders","StatusCode","ShopifyErrors.GraphqlQueryError","getHeader","ShopifyErrors.HttpMaxRetriesError","ShopifyErrors.HttpThrottlingError","ShopifyErrors.HttpInternalError","ShopifyErrors.HttpResponseError"],"mappings":";;;;;;;;;AAkBM,SAAU,YAAY,CAAC,MAAuB,EAAA;IAClD,IAAI,eAAe,GAAG,CAAA,EAAGA,kBAAY,CAAA,EAAA,EAAKC,mCAA2B,CAAA,GAAA,EAAMC,mCAAqB,EAAE,CAAA,CAAE;AACpG,IAAA,IAAI,MAAM,CAAC,eAAe,EAAE;QAC1B,eAAe,GAAG,GAAG,MAAM,CAAC,eAAe,CAAA,GAAA,EAAM,eAAe,EAAE;IACpE;AAEA,IAAA,OAAO,eAAe;AACxB;AAEA,SAAS,iBAAiB,CAAC,QAAwB,EAAA;IACjD,IAAI,CAAC,QAAQ,EAAE;AACb,QAAA,OAAO,EAAC,KAAK,EAAE,6BAA6B,EAAC;IAC/C;AAEA,IAAA,IAAI;AACF,QAAA,MAAM,EAAC,MAAM,EAAE,UAAU,EAAE,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAC,GAAG,QAAQ;AAEzE,QAAA,MAAM,UAAU,GAAQ;YACtB,MAAM;YACN,UAAU;YACV,EAAE;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AC5D;YACH;iBAAO;AACL,gBAAA,MAAM,IAAIE,uBAA+B,CAAC;oBACxC,OAAO,EAAE,CAAA,sBAAA,EAAyB,YAAY,CAAA,CAAE;oBAChD,IAAI;oBACJ,UAAU;oBACV,IAAI;AACJ,oBAAA,OAAO,EAAE,eAAe;AACzB,iBAAA,CAAC;YACJ;AACF,QAAA;AACE,YAAA,MAAM,IAAIC,uBAA+B,CAAC;gBACxC,OAAO,EAAE,CAAA,4BAAA,EAA+B,QAAQ,CAAC,MAAM,CAAA,CAAA,EAAI,QAAQ,CAAC,UAAU,CAAA,cAAA,EAAiB,YAAY,CAAA,CAAE;gBAC7G,IAAI;gBACJ,UAAU;gBACV,IAAI;AACJ,gBAAA,OAAO,EAAE,eAAe;AACzB,aAAA,CAAC;;AAER;;;;;;"}
1
+ {"version":3,"file":"common.js","sources":["../../../../../../lib/clients/common.ts"],"sourcesContent":["import {\n HTTPResponseLog,\n HTTPRetryLog,\n HTTPResponseGraphQLDeprecationNotice,\n LogContent,\n} from '@shopify/admin-api-client';\n\nimport * as ShopifyErrors from '../error';\nimport {LIBRARY_NAME, StatusCode} from '../types';\nimport {ConfigInterface} from '../base-types';\nimport {SHOPIFY_API_LIBRARY_VERSION} from '../version';\nimport {\n abstractRuntimeString,\n canonicalizeHeaders,\n getHeader,\n} from '../../runtime';\nimport {logger} from '../logger';\n\nexport function getUserAgent(config: ConfigInterface): string {\n let userAgentPrefix = `${LIBRARY_NAME} v${SHOPIFY_API_LIBRARY_VERSION} | ${abstractRuntimeString()}`;\n if (config.userAgentPrefix) {\n userAgentPrefix = `${config.userAgentPrefix} | ${userAgentPrefix}`;\n }\n\n return userAgentPrefix;\n}\n\nconst REDACTED_LOG_VALUE = '****';\n\n// These headers carry reusable credentials and must not reach the logs.\nconst SENSITIVE_LOG_HEADERS = new Set([\n 'authorization',\n 'cookie',\n 'set-cookie',\n 'shopify-storefront-private-token',\n 'x-shopify-access-token',\n 'x-shopify-storefront-access-token',\n]);\n\nfunction sanitizeHeaderValue(name: string, value: unknown): unknown {\n return SENSITIVE_LOG_HEADERS.has(name.toLowerCase())\n ? REDACTED_LOG_VALUE\n : value;\n}\n\n// Keep the original serialized shape of request headers. A Headers instance\n// has no own enumerable properties, so it stays opaque here, the same as\n// JSON.stringify shows it.\nfunction sanitizeHeaders(headers: any): any {\n if (!headers || typeof headers !== 'object') {\n return headers;\n }\n\n if (Array.isArray(headers)) {\n return headers.map((header) =>\n Array.isArray(header)\n ? [header[0], sanitizeHeaderValue(header[0], header[1])]\n : header,\n );\n }\n\n return Object.fromEntries(\n Object.entries(headers).map(([name, value]) => [\n name,\n sanitizeHeaderValue(name, value),\n ]),\n );\n}\n\n// Response headers were always enumerated in the log, so keep that and\n// redact the credential values.\nfunction sanitizeEnumerableHeaders(headers: any): any {\n if (typeof headers?.entries === 'function' && !Array.isArray(headers)) {\n return Object.fromEntries(\n [...headers.entries()].map(([name, value]: [string, string]) => [\n name,\n sanitizeHeaderValue(name, value),\n ]),\n );\n }\n\n return sanitizeHeaders(headers);\n}\n\nfunction sanitizeRequestParams<T>(requestParams: T): T {\n if (Array.isArray(requestParams)) {\n return requestParams.map((param) =>\n param && typeof param === 'object' && 'headers' in param\n ? {...param, headers: sanitizeHeaders(param.headers)}\n : param,\n ) as T;\n }\n\n if (\n requestParams &&\n typeof requestParams === 'object' &&\n 'headers' in requestParams\n ) {\n return {\n ...requestParams,\n headers: sanitizeHeaders((requestParams as {headers: any}).headers),\n };\n }\n\n return requestParams;\n}\n\nfunction serializeResponse(response: Response | any) {\n if (!response) {\n return {error: 'No response object provided'};\n }\n\n try {\n const {status, statusText, ok, redirected, type, url, headers} = response;\n\n const serialized: any = {\n status,\n statusText,\n ok,\n redirected,\n type,\n url,\n };\n\n if (headers) {\n serialized.headers = sanitizeEnumerableHeaders(headers);\n }\n\n return serialized;\n } catch {\n return response;\n }\n}\n\nexport function clientLoggerFactory(config: ConfigInterface) {\n return (logContent: LogContent) => {\n if (config.logger.httpRequests) {\n switch (logContent.type) {\n case 'HTTP-Response': {\n const responseLog: HTTPResponseLog['content'] = logContent.content;\n logger(config).debug('Received response for HTTP request', {\n requestParams: JSON.stringify(\n sanitizeRequestParams(responseLog.requestParams),\n ),\n response: JSON.stringify(serializeResponse(responseLog.response)),\n });\n break;\n }\n case 'HTTP-Retry': {\n const responseLog: HTTPRetryLog['content'] = logContent.content;\n logger(config).debug('Retrying HTTP request', {\n requestParams: JSON.stringify(\n sanitizeRequestParams(responseLog.requestParams),\n ),\n retryAttempt: responseLog.retryAttempt,\n maxRetries: responseLog.maxRetries,\n response: responseLog.lastResponse\n ? JSON.stringify(serializeResponse(responseLog.lastResponse))\n : 'undefined',\n });\n break;\n }\n case 'HTTP-Response-GraphQL-Deprecation-Notice': {\n const responseLog: HTTPResponseGraphQLDeprecationNotice['content'] =\n logContent.content;\n logger(config).debug(\n 'Received response containing Deprecated GraphQL Notice',\n {\n requestParams: JSON.stringify(\n sanitizeRequestParams(responseLog.requestParams),\n ),\n deprecationNotice: responseLog.deprecationNotice,\n },\n );\n break;\n }\n default: {\n logger(config).debug(`HTTP request event: ${logContent.content}`);\n break;\n }\n }\n }\n };\n}\n\nexport function throwFailedRequest(\n body: any,\n atMaxRetries: boolean,\n response?: Response,\n): never {\n if (typeof response === 'undefined') {\n const message = body?.errors?.message ?? '';\n throw new ShopifyErrors.HttpRequestError(\n `Http request error, no response available: ${message}`,\n );\n }\n\n const responseHeaders = canonicalizeHeaders(\n Object.fromEntries(response.headers.entries() ?? []),\n );\n\n if (response.status === StatusCode.Ok && body.errors.graphQLErrors) {\n throw new ShopifyErrors.GraphqlQueryError({\n message:\n body.errors.graphQLErrors?.[0].message ?? 'GraphQL operation failed',\n response: response as Record<string, any>,\n headers: responseHeaders,\n body: body as Record<string, any>,\n });\n }\n\n const errorMessages: string[] = [];\n if (body.errors) {\n errorMessages.push(JSON.stringify(body.errors, null, 2));\n }\n const xRequestId = getHeader(responseHeaders, 'x-request-id');\n if (xRequestId) {\n errorMessages.push(\n `If you report this error, please include this id: ${xRequestId}`,\n );\n }\n\n const errorMessage = errorMessages.length\n ? `:\\n${errorMessages.join('\\n')}`\n : '';\n const code = response.status;\n const statusText = response.statusText;\n\n switch (true) {\n case response.status === StatusCode.TooManyRequests: {\n if (atMaxRetries) {\n throw new ShopifyErrors.HttpMaxRetriesError(\n 'Attempted the maximum number of retries for HTTP request.',\n );\n } else {\n const retryAfter = getHeader(responseHeaders, 'Retry-After');\n throw new ShopifyErrors.HttpThrottlingError({\n message: `Shopify is throttling requests ${errorMessage}`,\n code,\n statusText,\n body,\n headers: responseHeaders,\n retryAfter: retryAfter ? parseFloat(retryAfter) : undefined,\n });\n }\n }\n case response.status >= StatusCode.InternalServerError:\n if (atMaxRetries) {\n throw new ShopifyErrors.HttpMaxRetriesError(\n 'Attempted the maximum number of retries for HTTP request.',\n );\n } else {\n throw new ShopifyErrors.HttpInternalError({\n message: `Shopify internal error${errorMessage}`,\n code,\n statusText,\n body,\n headers: responseHeaders,\n });\n }\n default:\n throw new ShopifyErrors.HttpResponseError({\n message: `Received an error response (${response.status} ${response.statusText}) from Shopify${errorMessage}`,\n code,\n statusText,\n body,\n headers: responseHeaders,\n });\n }\n}\n"],"names":["LIBRARY_NAME","SHOPIFY_API_LIBRARY_VERSION","abstractRuntimeString","logger","ShopifyErrors.HttpRequestError","canonicalizeHeaders","StatusCode","ShopifyErrors.GraphqlQueryError","getHeader","ShopifyErrors.HttpMaxRetriesError","ShopifyErrors.HttpThrottlingError","ShopifyErrors.HttpInternalError","ShopifyErrors.HttpResponseError"],"mappings":";;;;;;;;;AAkBM,SAAU,YAAY,CAAC,MAAuB,EAAA;IAClD,IAAI,eAAe,GAAG,CAAA,EAAGA,kBAAY,CAAA,EAAA,EAAKC,mCAA2B,CAAA,GAAA,EAAMC,mCAAqB,EAAE,CAAA,CAAE;AACpG,IAAA,IAAI,MAAM,CAAC,eAAe,EAAE;QAC1B,eAAe,GAAG,GAAG,MAAM,CAAC,eAAe,CAAA,GA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,EAAE,eAAe;AACzB,iBAAA,CAAC;YACJ;AACF,QAAA;AACE,YAAA,MAAM,IAAIC,uBAA+B,CAAC;gBACxC,OAAO,EAAE,CAAA,4BAAA,EAA+B,QAAQ,CAAC,MAAM,CAAA,CAAA,EAAI,QAAQ,CAAC,UAAU,CAAA,cAAA,EAAiB,YAAY,CAAA,CAAE;gBAC7G,IAAI;gBACJ,UAAU;gBACV,IAAI;AACJ,gBAAA,OAAO,EAAE,eAAe;AACzB,aAAA,CAAC;;AAER;;;;;;"}
@@ -4,6 +4,17 @@ var index$1 = require('../logger/index.js');
4
4
  var types = require('../types.js');
5
5
  var index = require('../../runtime/http/index.js');
6
6
 
7
+ const OAUTH_TOKEN_ENDPOINT_PATH = '/admin/oauth/access_token';
8
+ // Token endpoint bodies carry OAuth secrets, so they must not reach the logs.
9
+ // When the URL does not parse, fail closed and keep the body out of the logs.
10
+ function canLogRequestBody(url) {
11
+ try {
12
+ return new URL(url).pathname !== OAUTH_TOKEN_ENDPOINT_PATH;
13
+ }
14
+ catch {
15
+ return false;
16
+ }
17
+ }
7
18
  function fetchRequestFactory(config) {
8
19
  return async function fetchRequest(url, options) {
9
20
  const log = index$1.logger(config);
@@ -12,7 +23,7 @@ function fetchRequestFactory(config) {
12
23
  log.debug('Making HTTP request', {
13
24
  method: options?.method || 'GET',
14
25
  url,
15
- ...(options?.body && { body: options?.body }),
26
+ ...(options?.body && canLogRequestBody(url) && { body: options.body }),
16
27
  });
17
28
  }
18
29
  const response = await index.abstractFetch(url, options);
@@ -1 +1 @@
1
- {"version":3,"file":"fetch-request.js","sources":["../../../../../../lib/utils/fetch-request.ts"],"sourcesContent":["import {logger} from '../logger';\nimport {LogSeverity} from '../types';\nimport {abstractFetch} from '../../runtime';\nimport {ConfigInterface} from '../base-types';\n\nexport function fetchRequestFactory(config: ConfigInterface) {\n return async function fetchRequest(\n url: string,\n options?: RequestInit,\n ): Promise<Response> {\n const log = logger(config);\n const doLog =\n config.logger.httpRequests && config.logger.level === LogSeverity.Debug;\n\n if (doLog) {\n log.debug('Making HTTP request', {\n method: options?.method || 'GET',\n url,\n ...(options?.body && {body: options?.body}),\n });\n }\n\n const response = await abstractFetch(url, options);\n\n if (doLog) {\n log.debug('HTTP request completed', {\n method: options?.method || 'GET',\n url,\n status: response.status,\n });\n }\n\n return response;\n };\n}\n"],"names":["logger","LogSeverity","abstractFetch"],"mappings":";;;;;;AAKM,SAAU,mBAAmB,CAAC,MAAuB,EAAA;AACzD,IAAA,OAAO,eAAe,YAAY,CAChC,GAAW,EACX,OAAqB,EAAA;AAErB,QAAA,MAAM,GAAG,GAAGA,cAAM,CAAC,MAAM,CAAC;AAC1B,QAAA,MAAM,KAAK,GACT,MAAM,CAAC,MAAM,CAAC,YAAY,IAAI,MAAM,CAAC,MAAM,CAAC,KAAK,KAAKC,iBAAW,CAAC,KAAK;QAEzE,IAAI,KAAK,EAAE;AACT,YAAA,GAAG,CAAC,KAAK,CAAC,qBAAqB,EAAE;AAC/B,gBAAA,MAAM,EAAE,OAAO,EAAE,MAAM,IAAI,KAAK;gBAChC,GAAG;AACH,gBAAA,IAAI,OAAO,EAAE,IAAI,IAAI,EAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;AAC5C,aAAA,CAAC;QACJ;QAEA,MAAM,QAAQ,GAAG,MAAMC,mBAAa,CAAC,GAAG,EAAE,OAAO,CAAC;QAElD,IAAI,KAAK,EAAE;AACT,YAAA,GAAG,CAAC,KAAK,CAAC,wBAAwB,EAAE;AAClC,gBAAA,MAAM,EAAE,OAAO,EAAE,MAAM,IAAI,KAAK;gBAChC,GAAG;gBACH,MAAM,EAAE,QAAQ,CAAC,MAAM;AACxB,aAAA,CAAC;QACJ;AAEA,QAAA,OAAO,QAAQ;AACjB,IAAA,CAAC;AACH;;;;"}
1
+ {"version":3,"file":"fetch-request.js","sources":["../../../../../../lib/utils/fetch-request.ts"],"sourcesContent":["import {logger} from '../logger';\nimport {LogSeverity} from '../types';\nimport {abstractFetch} from '../../runtime';\nimport {ConfigInterface} from '../base-types';\n\nconst OAUTH_TOKEN_ENDPOINT_PATH = '/admin/oauth/access_token';\n\n// Token endpoint bodies carry OAuth secrets, so they must not reach the logs.\n// When the URL does not parse, fail closed and keep the body out of the logs.\nfunction canLogRequestBody(url: string): boolean {\n try {\n return new URL(url).pathname !== OAUTH_TOKEN_ENDPOINT_PATH;\n } catch {\n return false;\n }\n}\n\nexport function fetchRequestFactory(config: ConfigInterface) {\n return async function fetchRequest(\n url: string,\n options?: RequestInit,\n ): Promise<Response> {\n const log = logger(config);\n const doLog =\n config.logger.httpRequests && config.logger.level === LogSeverity.Debug;\n\n if (doLog) {\n log.debug('Making HTTP request', {\n method: options?.method || 'GET',\n url,\n ...(options?.body && canLogRequestBody(url) && {body: options.body}),\n });\n }\n\n const response = await abstractFetch(url, options);\n\n if (doLog) {\n log.debug('HTTP request completed', {\n method: options?.method || 'GET',\n url,\n status: response.status,\n });\n }\n\n return response;\n };\n}\n"],"names":["logger","LogSeverity","abstractFetch"],"mappings":";;;;;;AAKA,MAAM,yBAAyB,GAAG,2BAA2B;AAE7D;AACA;AACA,SAAS,iBAAiB,CAAC,GAAW,EAAA;AACpC,IAAA,IAAI;QACF,OAAO,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,KAAK,yBAAyB;IAC5D;AAAE,IAAA,MAAM;AACN,QAAA,OAAO,KAAK;IACd;AACF;AAEM,SAAU,mBAAmB,CAAC,MAAuB,EAAA;AACzD,IAAA,OAAO,eAAe,YAAY,CAChC,GAAW,EACX,OAAqB,EAAA;AAErB,QAAA,MAAM,GAAG,GAAGA,cAAM,CAAC,MAAM,CAAC;AAC1B,QAAA,MAAM,KAAK,GACT,MAAM,CAAC,MAAM,CAAC,YAAY,IAAI,MAAM,CAAC,MAAM,CAAC,KAAK,KAAKC,iBAAW,CAAC,KAAK;QAEzE,IAAI,KAAK,EAAE;AACT,YAAA,GAAG,CAAC,KAAK,CAAC,qBAAqB,EAAE;AAC/B,gBAAA,MAAM,EAAE,OAAO,EAAE,MAAM,IAAI,KAAK;gBAChC,GAAG;AACH,gBAAA,IAAI,OAAO,EAAE,IAAI,IAAI,iBAAiB,CAAC,GAAG,CAAC,IAAI,EAAC,IAAI,EAAE,OAAO,CAAC,IAAI,EAAC,CAAC;AACrE,aAAA,CAAC;QACJ;QAEA,MAAM,QAAQ,GAAG,MAAMC,mBAAa,CAAC,GAAG,EAAE,OAAO,CAAC;QAElD,IAAI,KAAK,EAAE;AACT,YAAA,GAAG,CAAC,KAAK,CAAC,wBAAwB,EAAE;AAClC,gBAAA,MAAM,EAAE,OAAO,EAAE,MAAM,IAAI,KAAK;gBAChC,GAAG;gBACH,MAAM,EAAE,QAAQ,CAAC,MAAM;AACxB,aAAA,CAAC;QACJ;AAEA,QAAA,OAAO,QAAQ;AACjB,IAAA,CAAC;AACH;;;;"}
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const SHOPIFY_API_LIBRARY_VERSION = '14.0.0';
3
+ const SHOPIFY_API_LIBRARY_VERSION = '14.0.1';
4
4
 
5
5
  exports.SHOPIFY_API_LIBRARY_VERSION = SHOPIFY_API_LIBRARY_VERSION;
6
6
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sources":["../../../../../lib/version.ts"],"sourcesContent":["export const SHOPIFY_API_LIBRARY_VERSION = '14.0.0';\n"],"names":[],"mappings":";;AAAO,MAAM,2BAA2B,GAAG;;;;"}
1
+ {"version":3,"file":"version.js","sources":["../../../../../lib/version.ts"],"sourcesContent":["export const SHOPIFY_API_LIBRARY_VERSION = '14.0.1';\n"],"names":[],"mappings":";;AAAO,MAAM,2BAA2B,GAAG;;;;"}