@agnostack/next-shopify 1.13.6 → 1.13.7-alpha.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/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [1.13.7-alpha.1](https://github.com/agnostack/next-shopify/compare/v1.13.6...v1.13.7-alpha.1) (2023-12-01)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * wip ([d3d121f](https://github.com/agnostack/next-shopify/commit/d3d121f402b46648cad0b1767a5ddd03de8d9dd7))
7
+
1
8
  ## [1.13.6](https://github.com/agnostack/next-shopify/compare/v1.13.5...v1.13.6) (2023-12-01)
2
9
 
3
10
 
@@ -1,4 +1,4 @@
1
- export function replaceHeaders({ headers, replacements }: {
1
+ export function replaceHeaders({ headers, replacements }?: {
2
2
  headers: any;
3
3
  replacements: any;
4
4
  }): any;
@@ -1 +1 @@
1
- {"version":3,"file":"headers.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/headers.js"],"names":[],"mappings":"AAeO;;;QAYN"}
1
+ {"version":3,"file":"headers.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/headers.js"],"names":[],"mappings":"AAgBO;;;QAcN"}
@@ -9,11 +9,13 @@ const templateReplace = (template, replacements, partials, tokens) => {
9
9
  mustache_1.default.escape = (value) => (value);
10
10
  return mustache_1.default.render((0, shared_1.ensureString)(template), (0, shared_1.ensureObject)(replacements), partials, tokens);
11
11
  };
12
- const replaceHeaders = ({ headers, replacements }) => {
12
+ const replaceHeaders = ({ headers, replacements } = {}) => {
13
13
  if ((0, shared_1.objectEmpty)(replacements)) {
14
14
  return headers;
15
15
  }
16
- return Object.entries(headers).reduce((_replacedHeaders, [header, headerValue]) => (Object.assign(Object.assign({}, _replacedHeaders), { [header]: headerValue.includes('{{') ? templateReplace(headerValue, replacements) : headerValue })), {});
16
+ return Object.entries(headers).reduce((_replacedHeaders, [header, headerValue]) => (Object.assign(Object.assign({}, _replacedHeaders), (0, shared_1.stringNotEmptyOnly)(headerValue) && {
17
+ [header]: headerValue.includes('{{') ? templateReplace(headerValue, replacements) : headerValue,
18
+ })), {});
17
19
  };
18
20
  exports.replaceHeaders = replaceHeaders;
19
21
  //# sourceMappingURL=headers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"headers.js","sourceRoot":"","sources":["../../../src/lib/utils/headers.js"],"names":[],"mappings":";;;;AAAA,gEAA+B;AAE/B,yCAIqB;AAErB,MAAM,eAAe,GAAG,CAAC,QAAQ,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE;IACnE,kKAAkK;IAClK,kBAAQ,CAAC,MAAM,GAAG,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAA;IAEpC,OAAO,kBAAQ,CAAC,MAAM,CAAC,IAAA,qBAAY,EAAC,QAAQ,CAAC,EAAE,IAAA,qBAAY,EAAC,YAAY,CAAC,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAA;AAC9F,CAAC,CAAA;AAEM,MAAM,cAAc,GAAG,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,EAAE,EAAE;IAC1D,IAAI,IAAA,oBAAW,EAAC,YAAY,CAAC,EAAE;QAC7B,OAAO,OAAO,CAAA;KACf;IAED,OAAO,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CACpC,gBAAgB,EAChB,CAAC,MAAM,EAAE,WAAW,CAAC,EACrB,EAAE,CAAC,iCACA,gBAAgB,KACnB,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC,WAAW,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,WAAW,IAC/F,EAAE,EAAE,CAAC,CAAA;AACT,CAAC,CAAA;AAZY,QAAA,cAAc,kBAY1B"}
1
+ {"version":3,"file":"headers.js","sourceRoot":"","sources":["../../../src/lib/utils/headers.js"],"names":[],"mappings":";;;;AAAA,gEAA+B;AAE/B,yCAKqB;AAErB,MAAM,eAAe,GAAG,CAAC,QAAQ,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE;IACnE,kKAAkK;IAClK,kBAAQ,CAAC,MAAM,GAAG,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAA;IAEpC,OAAO,kBAAQ,CAAC,MAAM,CAAC,IAAA,qBAAY,EAAC,QAAQ,CAAC,EAAE,IAAA,qBAAY,EAAC,YAAY,CAAC,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAA;AAC9F,CAAC,CAAA;AAEM,MAAM,cAAc,GAAG,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,GAAG,EAAE,EAAE,EAAE;IAC/D,IAAI,IAAA,oBAAW,EAAC,YAAY,CAAC,EAAE;QAC7B,OAAO,OAAO,CAAA;KACf;IAED,OAAO,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CACpC,gBAAgB,EAChB,CAAC,MAAM,EAAE,WAAW,CAAC,EACrB,EAAE,CAAC,iCACA,gBAAgB,GAChB,IAAA,2BAAkB,EAAC,WAAW,CAAC,IAAI;QACpC,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC,WAAW,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,WAAW;KAChG,EACD,EAAE,EAAE,CAAC,CAAA;AACT,CAAC,CAAA;AAdY,QAAA,cAAc,kBAc1B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agnostack/next-shopify",
3
- "version": "1.13.6",
3
+ "version": "1.13.7-alpha.1",
4
4
  "author": "agnoStack Dev <developers@agnostack.com> (https://agnostack.com)",
5
5
  "owner": "agnoStack",
6
6
  "description": "Please contact agnoStack via info@agnostack.com for any questions",