@sentecacommerce-theme/lib 0.13.10 → 0.13.11

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.
@@ -42,7 +42,7 @@ function handleRobots(res, domain) {
42
42
  }
43
43
  function _handleRobots() {
44
44
  _handleRobots = _asyncToGenerator(_regeneratorRuntime.default.mark(function _callee(res, domain) {
45
- var disallowed, txt, _args = arguments;
45
+ var disallowed, siteMapUrl, txt, _args = arguments;
46
46
  return _regeneratorRuntime.default.wrap(function _callee$(_ctx) {
47
47
  while(1)switch(_ctx.prev = _ctx.next){
48
48
  case 0:
@@ -53,18 +53,19 @@ function _handleRobots() {
53
53
  '/profile',
54
54
  '/favorites'
55
55
  ];
56
+ siteMapUrl = "https://".concat(domain, "sitemap.xml");
56
57
  if (!(process.env.NO_INDEX === 'true')) {
57
- _ctx.next = 4;
58
+ _ctx.next = 5;
58
59
  break;
59
60
  }
60
61
  res.status(200).send('User-agent: *\nDisallow: /');
61
62
  return _ctx.abrupt("return");
62
- case 4:
63
+ case 5:
63
64
  txt = disallowed.reduce(function(value, str) {
64
65
  return value + "Disallow: ".concat(str, "\n");
65
- }, "Sitemap: ".concat(domain, "/sitemap.xml\nUser-agent: *\n"));
66
+ }, "Sitemap: ".concat(siteMapUrl, "\nUser-agent: *\n"));
66
67
  res.status(200).send(txt);
67
- case 6:
68
+ case 7:
68
69
  case "end":
69
70
  return _ctx.stop();
70
71
  }
@@ -33,7 +33,7 @@ export function handleRobots(res, domain) {
33
33
  }
34
34
  function _handleRobots() {
35
35
  _handleRobots = _asyncToGenerator(regeneratorRuntime.mark(function _callee(res, domain) {
36
- var disallowed, txt, _args = arguments;
36
+ var disallowed, siteMapUrl, txt, _args = arguments;
37
37
  return regeneratorRuntime.wrap(function _callee$(_ctx) {
38
38
  while(1)switch(_ctx.prev = _ctx.next){
39
39
  case 0:
@@ -44,18 +44,19 @@ function _handleRobots() {
44
44
  '/profile',
45
45
  '/favorites'
46
46
  ];
47
+ siteMapUrl = "https://".concat(domain, "sitemap.xml");
47
48
  if (!(process.env.NO_INDEX === 'true')) {
48
- _ctx.next = 4;
49
+ _ctx.next = 5;
49
50
  break;
50
51
  }
51
52
  res.status(200).send('User-agent: *\nDisallow: /');
52
53
  return _ctx.abrupt("return");
53
- case 4:
54
+ case 5:
54
55
  txt = disallowed.reduce(function(value, str) {
55
56
  return value + "Disallow: ".concat(str, "\n");
56
- }, "Sitemap: ".concat(domain, "/sitemap.xml\nUser-agent: *\n"));
57
+ }, "Sitemap: ".concat(siteMapUrl, "\nUser-agent: *\n"));
57
58
  res.status(200).send(txt);
58
- case 6:
59
+ case 7:
59
60
  case "end":
60
61
  return _ctx.stop();
61
62
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sentecacommerce-theme/lib",
3
3
  "sideEffects": false,
4
- "version": "0.13.10",
4
+ "version": "0.13.11",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
7
7
  "types": "dist/types/index.d.ts",
@@ -31,13 +31,13 @@
31
31
  "watch:cjs": "swc src --out-dir dist/cjs -w",
32
32
  "watch:esm": "swc src --out-dir dist/esm --no-swcrc -w"
33
33
  },
34
- "gitHead": "670581c6389f24e706bbf7d72cc397c1acce32e7",
34
+ "gitHead": "c8695f92d2d816afc545654585bb1f18a573c85d",
35
35
  "peerDependencies": {
36
36
  "react-query": "^2.26.2"
37
37
  },
38
38
  "dependencies": {
39
- "@sentecacommerce-theme/base": "^0.13.10",
40
- "@sentecacommerce-theme/cms": "^0.13.10",
39
+ "@sentecacommerce-theme/base": "^0.13.11",
40
+ "@sentecacommerce-theme/cms": "^0.13.11",
41
41
  "@sentecacommerce/sdk": "2.0.175",
42
42
  "body-scroll-lock": "^3.1.5",
43
43
  "copy-to-clipboard": "^3.3.1",