@stoplight/elements-dev-portal 1.6.16 → 1.6.17

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/index.esm.js CHANGED
@@ -218,7 +218,7 @@ const UpgradeToStarter = () => (React__default.createElement(Flex, { as: "a", hr
218
218
  React__default.createElement(Icon, { icon: faExclamationTriangle, size: "4x" }),
219
219
  React__default.createElement(Box, { pt: 3 }, "Please upgrade your Stoplight Workspace to the Starter Plan to use Elements Dev Portal in production.")));
220
220
 
221
- const appVersion = '1.6.16';
221
+ const appVersion = '1.6.17';
222
222
 
223
223
  class ResponseError extends Error {
224
224
  constructor(message, responseCode) {
@@ -337,6 +337,9 @@ const StoplightProjectImpl = ({ projectId, hideTryIt, hideMocking, hideExport, c
337
337
  else if (!node) {
338
338
  elem = React.createElement(NotFound, null);
339
339
  }
340
+ else if ((node === null || node === void 0 ? void 0 : node.slug) && nodeSlug !== node.slug) {
341
+ return React.createElement(Redirect, { to: branchSlug ? `/branches/${branchSlug}/${node.slug}` : `/${node.slug}` });
342
+ }
340
343
  else {
341
344
  elem = (React.createElement(NodeContent, { node: node, Link: ReactRouterMarkdownLink, hideTryIt: hideTryIt, hideMocking: hideMocking, hideExport: hideExport, tryItCredentialsPolicy: tryItCredentialsPolicy, tryItCorsProxy: tryItCorsProxy }));
342
345
  }
package/index.js CHANGED
@@ -245,7 +245,7 @@ const UpgradeToStarter = () => (React__default["default"].createElement(mosaic.F
245
245
  React__default["default"].createElement(mosaic.Icon, { icon: freeSolidSvgIcons.faExclamationTriangle, size: "4x" }),
246
246
  React__default["default"].createElement(mosaic.Box, { pt: 3 }, "Please upgrade your Stoplight Workspace to the Starter Plan to use Elements Dev Portal in production.")));
247
247
 
248
- const appVersion = '1.6.16';
248
+ const appVersion = '1.6.17';
249
249
 
250
250
  class ResponseError extends Error {
251
251
  constructor(message, responseCode) {
@@ -364,6 +364,9 @@ const StoplightProjectImpl = ({ projectId, hideTryIt, hideMocking, hideExport, c
364
364
  else if (!node) {
365
365
  elem = React__namespace.createElement(NotFound, null);
366
366
  }
367
+ else if ((node === null || node === void 0 ? void 0 : node.slug) && nodeSlug !== node.slug) {
368
+ return React__namespace.createElement(reactRouterDom.Redirect, { to: branchSlug ? `/branches/${branchSlug}/${node.slug}` : `/${node.slug}` });
369
+ }
367
370
  else {
368
371
  elem = (React__namespace.createElement(NodeContent, { node: node, Link: elementsCore.ReactRouterMarkdownLink, hideTryIt: hideTryIt, hideMocking: hideMocking, hideExport: hideExport, tryItCredentialsPolicy: tryItCredentialsPolicy, tryItCorsProxy: tryItCorsProxy }));
369
372
  }
package/index.mjs CHANGED
@@ -218,7 +218,7 @@ const UpgradeToStarter = () => (React__default.createElement(Flex, { as: "a", hr
218
218
  React__default.createElement(Icon, { icon: faExclamationTriangle, size: "4x" }),
219
219
  React__default.createElement(Box, { pt: 3 }, "Please upgrade your Stoplight Workspace to the Starter Plan to use Elements Dev Portal in production.")));
220
220
 
221
- const appVersion = '1.6.16';
221
+ const appVersion = '1.6.17';
222
222
 
223
223
  class ResponseError extends Error {
224
224
  constructor(message, responseCode) {
@@ -337,6 +337,9 @@ const StoplightProjectImpl = ({ projectId, hideTryIt, hideMocking, hideExport, c
337
337
  else if (!node) {
338
338
  elem = React.createElement(NotFound, null);
339
339
  }
340
+ else if ((node === null || node === void 0 ? void 0 : node.slug) && nodeSlug !== node.slug) {
341
+ return React.createElement(Redirect, { to: branchSlug ? `/branches/${branchSlug}/${node.slug}` : `/${node.slug}` });
342
+ }
340
343
  else {
341
344
  elem = (React.createElement(NodeContent, { node: node, Link: ReactRouterMarkdownLink, hideTryIt: hideTryIt, hideMocking: hideMocking, hideExport: hideExport, tryItCredentialsPolicy: tryItCredentialsPolicy, tryItCorsProxy: tryItCorsProxy }));
342
345
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stoplight/elements-dev-portal",
3
- "version": "1.6.16",
3
+ "version": "1.6.17",
4
4
  "description": "UI components for composing beautiful developer documentation.",
5
5
  "keywords": [],
6
6
  "main": "./index.js",
package/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const appVersion = "1.6.16";
1
+ export declare const appVersion = "1.6.17";