@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.
@@ -12,6 +12,65 @@ function getUserAgent(config) {
12
12
  }
13
13
  return userAgentPrefix;
14
14
  }
15
+ const REDACTED_LOG_VALUE = '****';
16
+ // These headers carry reusable credentials and must not reach the logs.
17
+ const SENSITIVE_LOG_HEADERS = new Set([
18
+ 'authorization',
19
+ 'cookie',
20
+ 'set-cookie',
21
+ 'shopify-storefront-private-token',
22
+ 'x-shopify-access-token',
23
+ 'x-shopify-storefront-access-token',
24
+ ]);
25
+ function sanitizeHeaderValue(name, value) {
26
+ return SENSITIVE_LOG_HEADERS.has(name.toLowerCase())
27
+ ? REDACTED_LOG_VALUE
28
+ : value;
29
+ }
30
+ // Keep the original serialized shape of request headers. A Headers instance
31
+ // has no own enumerable properties, so it stays opaque here, the same as
32
+ // JSON.stringify shows it.
33
+ function sanitizeHeaders(headers) {
34
+ if (!headers || typeof headers !== 'object') {
35
+ return headers;
36
+ }
37
+ if (Array.isArray(headers)) {
38
+ return headers.map((header) => Array.isArray(header)
39
+ ? [header[0], sanitizeHeaderValue(header[0], header[1])]
40
+ : header);
41
+ }
42
+ return Object.fromEntries(Object.entries(headers).map(([name, value]) => [
43
+ name,
44
+ sanitizeHeaderValue(name, value),
45
+ ]));
46
+ }
47
+ // Response headers were always enumerated in the log, so keep that and
48
+ // redact the credential values.
49
+ function sanitizeEnumerableHeaders(headers) {
50
+ if (typeof headers?.entries === 'function' && !Array.isArray(headers)) {
51
+ return Object.fromEntries([...headers.entries()].map(([name, value]) => [
52
+ name,
53
+ sanitizeHeaderValue(name, value),
54
+ ]));
55
+ }
56
+ return sanitizeHeaders(headers);
57
+ }
58
+ function sanitizeRequestParams(requestParams) {
59
+ if (Array.isArray(requestParams)) {
60
+ return requestParams.map((param) => param && typeof param === 'object' && 'headers' in param
61
+ ? { ...param, headers: sanitizeHeaders(param.headers) }
62
+ : param);
63
+ }
64
+ if (requestParams &&
65
+ typeof requestParams === 'object' &&
66
+ 'headers' in requestParams) {
67
+ return {
68
+ ...requestParams,
69
+ headers: sanitizeHeaders(requestParams.headers),
70
+ };
71
+ }
72
+ return requestParams;
73
+ }
15
74
  function serializeResponse(response) {
16
75
  if (!response) {
17
76
  return { error: 'No response object provided' };
@@ -26,11 +85,8 @@ function serializeResponse(response) {
26
85
  type,
27
86
  url,
28
87
  };
29
- if (headers?.entries) {
30
- serialized.headers = Object.fromEntries(headers.entries());
31
- }
32
- else if (headers) {
33
- serialized.headers = headers;
88
+ if (headers) {
89
+ serialized.headers = sanitizeEnumerableHeaders(headers);
34
90
  }
35
91
  return serialized;
36
92
  }
@@ -45,7 +101,7 @@ function clientLoggerFactory(config) {
45
101
  case 'HTTP-Response': {
46
102
  const responseLog = logContent.content;
47
103
  logger(config).debug('Received response for HTTP request', {
48
- requestParams: JSON.stringify(responseLog.requestParams),
104
+ requestParams: JSON.stringify(sanitizeRequestParams(responseLog.requestParams)),
49
105
  response: JSON.stringify(serializeResponse(responseLog.response)),
50
106
  });
51
107
  break;
@@ -53,7 +109,7 @@ function clientLoggerFactory(config) {
53
109
  case 'HTTP-Retry': {
54
110
  const responseLog = logContent.content;
55
111
  logger(config).debug('Retrying HTTP request', {
56
- requestParams: JSON.stringify(responseLog.requestParams),
112
+ requestParams: JSON.stringify(sanitizeRequestParams(responseLog.requestParams)),
57
113
  retryAttempt: responseLog.retryAttempt,
58
114
  maxRetries: responseLog.maxRetries,
59
115
  response: responseLog.lastResponse
@@ -65,7 +121,7 @@ function clientLoggerFactory(config) {
65
121
  case 'HTTP-Response-GraphQL-Deprecation-Notice': {
66
122
  const responseLog = logContent.content;
67
123
  logger(config).debug('Received response containing Deprecated GraphQL Notice', {
68
- requestParams: JSON.stringify(responseLog.requestParams),
124
+ requestParams: JSON.stringify(sanitizeRequestParams(responseLog.requestParams)),
69
125
  deprecationNotice: responseLog.deprecationNotice,
70
126
  });
71
127
  break;
@@ -1 +1 @@
1
- {"version":3,"file":"common.mjs","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":["ShopifyErrors.HttpRequestError","ShopifyErrors.GraphqlQueryError","ShopifyErrors.HttpMaxRetriesError","ShopifyErrors.HttpThrottlingError","ShopifyErrors.HttpInternalError","ShopifyErrors.HttpResponseError"],"mappings":";;;;;;;AAkBM,SAAU,YAAY,CAAC,MAAuB,EAAA;IAClD,IAAI,eAAe,GAAG,CAAA,EAAG,YAAY,CAAA,EAAA,EAAK,2BAA2B,CAAA,GAAA,EAAM,qBAAqB,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;YACF,UAAU;YACV,IAAI;YACJ,GAAG;SACJ;AAED,QAAA,IAAI,OAAO,EAAE,OAAO,EAAE;AACpB,YAAA,U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;oBAChD,IAAI;oBACJ,UAAU;oBACV,IAAI;AACJ,oBAAA,OAAO,EAAE,eAAe;AACzB,iBAAA,CAAC;YACJ;AACF,QAAA;AACE,YAAA,MAAM,IAAIC,iBAA+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.mjs","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":["ShopifyErrors.HttpRequestError","ShopifyErrors.GraphqlQueryError","ShopifyErrors.HttpMaxRetriesError","ShopifyErrors.HttpThrottlingError","ShopifyErrors.HttpInternalError","ShopifyErrors.HttpResponseError"],"mappings":";;;;;;;AAkBM,SAAU,YAAY,CAAC,MAAuB,EAAA;IAClD,IAAI,eAAe,GAAG,CAAA,EAAG,YAAY,CAAA,EAAA,EAAK,2BAA2B,CAAA,GAAA,EAAM,qBAAqB,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,MAAM,kBAAkB,GAAG,MAAM;AAEjC;AACA,MAAM,qBAAqB,GAAG,IAAI,GAAG,CAAC;IACpC,eAAe;IACf,QAAQ;IACR,YAAY;IACZ,kCAAkC;IAClC,wBAAwB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AC7G,IAAI;gBACJ,UAAU;gBACV,IAAI;AACJ,gBAAA,OAAO,EAAE,eAAe;AACzB,aAAA,CAAC;;AAER;;;;"}
@@ -2,6 +2,17 @@ import { logger } from '../logger/index.mjs';
2
2
  import { LogSeverity } from '../types.mjs';
3
3
  import { abstractFetch } from '../../runtime/http/index.mjs';
4
4
 
5
+ const OAUTH_TOKEN_ENDPOINT_PATH = '/admin/oauth/access_token';
6
+ // Token endpoint bodies carry OAuth secrets, so they must not reach the logs.
7
+ // When the URL does not parse, fail closed and keep the body out of the logs.
8
+ function canLogRequestBody(url) {
9
+ try {
10
+ return new URL(url).pathname !== OAUTH_TOKEN_ENDPOINT_PATH;
11
+ }
12
+ catch {
13
+ return false;
14
+ }
15
+ }
5
16
  function fetchRequestFactory(config) {
6
17
  return async function fetchRequest(url, options) {
7
18
  const log = logger(config);
@@ -10,7 +21,7 @@ function fetchRequestFactory(config) {
10
21
  log.debug('Making HTTP request', {
11
22
  method: options?.method || 'GET',
12
23
  url,
13
- ...(options?.body && { body: options?.body }),
24
+ ...(options?.body && canLogRequestBody(url) && { body: options.body }),
14
25
  });
15
26
  }
16
27
  const response = await abstractFetch(url, options);
@@ -1 +1 @@
1
- {"version":3,"file":"fetch-request.mjs","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":[],"mappings":";;;;AAKM,SAAU,mBAAmB,CAAC,MAAuB,EAAA;AACzD,IAAA,OAAO,eAAe,YAAY,CAChC,GAAW,EACX,OAAqB,EAAA;AAErB,QAAA,MAAM,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC;AAC1B,QAAA,MAAM,KAAK,GACT,MAAM,CAAC,MAAM,CAAC,YAAY,IAAI,MAAM,CAAC,MAAM,CAAC,KAAK,KAAK,WAAW,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,MAAM,aAAa,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.mjs","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":[],"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,GAAG,MAAM,CAAC,MAAM,CAAC;AAC1B,QAAA,MAAM,KAAK,GACT,MAAM,CAAC,MAAM,CAAC,YAAY,IAAI,MAAM,CAAC,MAAM,CAAC,KAAK,KAAK,WAAW,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,MAAM,aAAa,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,4 +1,4 @@
1
- const SHOPIFY_API_LIBRARY_VERSION = '14.0.0';
1
+ const SHOPIFY_API_LIBRARY_VERSION = '14.0.1';
2
2
 
3
3
  export { SHOPIFY_API_LIBRARY_VERSION };
4
4
  //# sourceMappingURL=version.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.mjs","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.mjs","sources":["../../../../../lib/version.ts"],"sourcesContent":["export const SHOPIFY_API_LIBRARY_VERSION = '14.0.1';\n"],"names":[],"mappings":"AAAO,MAAM,2BAA2B,GAAG;;;;"}