@kaspernj/api-maker 1.0.138 → 1.0.139

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.138",
19
+ "version": "1.0.139",
20
20
  "description": "",
21
21
  "main": "index.js",
22
22
  "repository": {
@@ -34,6 +34,24 @@
34
34
  "eslint-find-rules": "eslint-find-rules",
35
35
  "test": "jest"
36
36
  },
37
+ "dependencies": {
38
+ "@rails/actioncable": ">= 6.1.0",
39
+ "clone-deep": ">= 4.0.1",
40
+ "debounce": ">= 1.2.1",
41
+ "diggerize": ">= 1.0.4",
42
+ "epic-locks": ">= 1.0.1",
43
+ "form-data-objectizer": ">= 1.0.0",
44
+ "form-serialize": ">= 0.7.2",
45
+ "format-number": ">= 3.0.0",
46
+ "inflection": ">= 1.12.0",
47
+ "js-money": ">= 0.6.3",
48
+ "numberable": ">= 1.0.0",
49
+ "object-to-formdata": ">= 4.1.0",
50
+ "qs": ">= 6.9.3",
51
+ "replaceall": ">= 0.1.6",
52
+ "strftime": ">= 0.10.0",
53
+ "wake-event": ">= 0.0.1"
54
+ },
37
55
  "peerDependencies": {
38
56
  "prop-types": "^15.7.2",
39
57
  "prop-types-exact": ">= 1.2.0",
@@ -55,23 +73,5 @@
55
73
  "i18n-on-steroids": "^1.0.2",
56
74
  "jest": "^27.0.6",
57
75
  "jsdom": "^19.0.0"
58
- },
59
- "dependencies": {
60
- "@rails/actioncable": ">= 6.1.0",
61
- "clone-deep": ">= 4.0.1",
62
- "debounce": ">= 1.2.1",
63
- "diggerize": ">= 1.0.4",
64
- "epic-locks": ">= 1.0.1",
65
- "form-data-objectizer": ">= 1.0.0",
66
- "form-serialize": ">= 0.7.2",
67
- "format-number": ">= 3.0.0",
68
- "inflection": ">= 1.12.0",
69
- "js-money": ">= 0.6.3",
70
- "numberable": ">= 1.0.0",
71
- "object-to-formdata": ">= 4.1.0",
72
- "qs": ">= 6.9.3",
73
- "replaceall": ">= 0.1.6",
74
- "strftime": ">= 0.10.0",
75
- "wake-event": ">= 0.0.1"
76
76
  }
77
77
  }
package/src/config.js ADDED
@@ -0,0 +1,15 @@
1
+ class ApiMakerConfig {
2
+ getCurrenciesCollection() {
3
+ if (!this._currenciesCollection) throw new Error("Currencies collection hasn't been set")
4
+
5
+ return this._currenciesCollection
6
+ }
7
+
8
+ setCurrenciesCollection(newCurrenciesCollection) {
9
+ this._currenciesCollection = newCurrenciesCollection
10
+ }
11
+ }
12
+
13
+ const apiMakerConfig = new ApiMakerConfig()
14
+
15
+ export default apiMakerConfig
package/src/routes.cjs CHANGED
@@ -3,6 +3,8 @@ const inflection = require("inflection")
3
3
 
4
4
  module.exports = class ApiMakerRoutes {
5
5
  constructor ({jsRoutes, locale, routeDefinitions}) {
6
+ if (!jsRoutes) throw new Error("'jsRoutes' wasn't given")
7
+
6
8
  this.jsRoutes = jsRoutes
7
9
  this.routeDefinitions = routeDefinitions
8
10