dataflux 1.8.0 → 1.9.2

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.
@@ -57,6 +57,8 @@ var getDataStringHook = function getDataStringHook(hook) {
57
57
  })).then(function (data) {
58
58
  return out.push(data.data);
59
59
  });
60
+ }).then(function () {
61
+ return out;
60
62
  });
61
63
  }
62
64
  };
@@ -143,23 +145,27 @@ var getHooksFromUrl = function getHooksFromUrl(url) {
143
145
  exports.getHooksFromUrl = getHooksFromUrl;
144
146
 
145
147
  var executeHook = function executeHook(type, hook, data, axios) {
146
- var hookType = _typeof(hook);
148
+ try {
149
+ var hookType = _typeof(hook);
147
150
 
148
- switch (hookType) {
149
- case "object":
150
- return getDataStringHook(hook, data, axios);
151
+ switch (hookType) {
152
+ case "object":
153
+ return getDataStringHook(hook, data, axios);
151
154
 
152
- case "function":
153
- var res = hook(data);
155
+ case "function":
156
+ var res = hook(data);
154
157
 
155
- if (res.method && res.url && res.headers) {
156
- return getDataStringHook(res, data, axios);
157
- } else {
158
- return res;
159
- }
158
+ if (res.method && res.url && res.headers) {
159
+ return getDataStringHook(res, data, axios);
160
+ } else {
161
+ return res;
162
+ }
160
163
 
161
- default:
162
- return Promise.reject("The ".concat(type, " hook must be a URL or a function returning a promise"));
164
+ default:
165
+ return Promise.reject("The ".concat(type, " hook must be a URL or a function returning a promise"));
166
+ }
167
+ } catch (e) {
168
+ return Promise.reject(e);
163
169
  }
164
170
  };
165
171
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dataflux",
3
- "version": "1.8.0",
3
+ "version": "1.9.2",
4
4
  "description": "DataFlux, automatically interfaces with your REST APIs to create a 2-way-synced local data store. Transparently manages data propagation in the React state.",
5
5
  "main": "dist/index.js",
6
6
  "bin": "dist/index.js",
@@ -80,11 +80,11 @@
80
80
  }
81
81
  },
82
82
  "devDependencies": {
83
- "@babel/cli": "^7.17.0",
84
- "@babel/core": "^7.17.0",
83
+ "@babel/cli": "^7.17.6",
84
+ "@babel/core": "^7.17.5",
85
85
  "@babel/node": "^7.16.8",
86
86
  "@babel/plugin-proposal-class-properties": "^7.16.7",
87
- "@babel/plugin-proposal-object-rest-spread": "^7.16.7",
87
+ "@babel/plugin-proposal-object-rest-spread": "^7.17.3",
88
88
  "@babel/plugin-transform-async-to-generator": "^7.16.8",
89
89
  "@babel/plugin-transform-runtime": "^7.17.0",
90
90
  "@babel/preset-env": "^7.16.11",
@@ -92,12 +92,12 @@
92
92
  "chai": "^4.3.6",
93
93
  "chai-subset": "^1.6.0",
94
94
  "dotenv-cli": "^5.0.0",
95
- "mocha": "^9.2.0",
96
- "release-it": "^14.12.4",
97
- "uglify-js": "^3.15.1"
95
+ "mocha": "^9.2.1",
96
+ "release-it": "^14.12.5",
97
+ "uglify-js": "^3.15.2"
98
98
  },
99
99
  "dependencies": {
100
- "axios": "^0.25.0",
100
+ "axios": "^0.26.0",
101
101
  "batch-promises": "^0.0.3",
102
102
  "brembo": "^2.0.6",
103
103
  "crc-32": "^1.2.1",