@feardread/feature-factory 2.0.1 → 2.0.3

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feardread/feature-factory",
3
- "version": "2.0.1",
3
+ "version": "2.0.3",
4
4
  "main": "dist/index.js",
5
5
  "scripts": {
6
6
  "build": "rollup -c",
@@ -5,11 +5,11 @@ import cache from "../cache/cache.js";
5
5
 
6
6
 
7
7
 
8
- const InstanceFactory = ( options ) => {
9
-
8
+ const InstanceFactory = (( options ) => {
9
+ console.log('Instance Opts = ', options)
10
10
  const API_BASE_URL = (options.API_BASE_URL)
11
11
  ? options.API_BASE_URL
12
- : "http://fear.master.com:4000/fear/api/";
12
+ : "http://fear.master.com/fear/api/";
13
13
 
14
14
  const ACCESS_TOKEN_NAME = (options.JWT_TOKEN)
15
15
  ? options.JWT_TOKEN
@@ -71,7 +71,7 @@ const InstanceFactory = ( options ) => {
71
71
  );
72
72
 
73
73
  return instance;
74
- }
74
+ })();
75
75
 
76
76
 
77
77
 
@@ -10,8 +10,9 @@ const StateFactory = (entity, data = null) => ({
10
10
 
11
11
  const FeatureFactory = (sliceName, endpoint, options = {}) => {
12
12
  const apiEndpoint = `${sliceName}/${endpoint}`;
13
+
13
14
  const API = InstanceFactory({
14
- API_BASE_URL: 'http://fear.master.com:4000/fear/api',
15
+ API_BASE_URL: 'http://localhost:4000/fear/api',
15
16
  JWT_TOKEN: 'fear-x-token'
16
17
  });
17
18
 
@@ -116,7 +117,6 @@ const FeatureFactory = (sliceName, endpoint, options = {}) => {
116
117
  return {
117
118
  reducer: slice.reducer,
118
119
  actions: slice.actions,
119
- instance: API,
120
120
  asyncActions: {
121
121
  fetch,
122
122
  fetchOne,