@kaspernj/api-maker 1.0.152 → 1.0.159

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/package.json CHANGED
@@ -16,7 +16,7 @@
16
16
  ]
17
17
  },
18
18
  "name": "@kaspernj/api-maker",
19
- "version": "1.0.152",
19
+ "version": "1.0.159",
20
20
  "description": "",
21
21
  "main": "index.js",
22
22
  "repository": {
@@ -12,7 +12,7 @@ const errorMessages = (args) => {
12
12
  }
13
13
  }
14
14
 
15
- module.exports = class CustomError extends Error {
15
+ class CustomError extends Error {
16
16
  constructor (message, args = {}) {
17
17
  let messageToUse = message
18
18
 
@@ -38,3 +38,7 @@ module.exports = class CustomError extends Error {
38
38
  }
39
39
  }
40
40
  }
41
+
42
+ CustomError.apiMakerType = "CustomError"
43
+
44
+ module.exports = CustomError
package/src/link.jsx CHANGED
@@ -2,10 +2,10 @@ import React from "react"
2
2
 
3
3
  export default class Link extends React.PureComponent {
4
4
  render() {
5
- const {to, ...restProps} = this.props
5
+ const {to, onClick, ...restProps} = this.props
6
6
 
7
7
  return (
8
- <a href={to} {...restProps} onClick={this.onLinkClicked} />
8
+ <a href={to} {...restProps} onClick={onClick || this.onLinkClicked} />
9
9
  )
10
10
  }
11
11
 
@@ -1,7 +1,7 @@
1
1
  const CustomError = require("./custom-error.cjs")
2
2
  const inflection = require("inflection")
3
3
 
4
- module.exports = class ValidationError extends CustomError {
4
+ class ValidationError extends CustomError {
5
5
  constructor (validationErrors, args) {
6
6
  super(validationErrors.getUnhandledErrorMessage() || validationErrors.getErrorMessage(), args)
7
7
  this.validationErrors = validationErrors
@@ -21,3 +21,7 @@ module.exports = class ValidationError extends CustomError {
21
21
  return false
22
22
  }
23
23
  }
24
+
25
+ ValidationError.apiMakerType = "CustomError"
26
+
27
+ module.exports = ValidationError