@feardread/feature-factory 5.0.7 → 5.0.8

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/dist/index.mjs CHANGED
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feardread/feature-factory",
3
- "version": "5.0.7",
3
+ "version": "5.0.8",
4
4
  "description": "Library to interact with redux toolkit and reduce boilerplate / repeated code",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -18,6 +18,7 @@
18
18
  "dependencies": {
19
19
  "@babel/core": "^7.28.0",
20
20
  "@reduxjs/toolkit": "^2.8.2",
21
+ "@rollup/plugin-typescript": "^12.1.4",
21
22
  "axios": "^1.11.0",
22
23
  "react": "^19.1.0",
23
24
  "react-redux": "^9.2.0",
package/rollup.config.mjs CHANGED
File without changes
@@ -9,9 +9,9 @@ const CONFIG = {
9
9
  BASE_URL: null,
10
10
  // API Base URLs
11
11
  baseUrls: {
12
- production: process.env.REACT_APP_API_BASE_URL_PROD || 'http://fear.master.com/fear/api/',
13
- development: process.env.REACT_APP_API_BASE_URL_DEV || 'http://localhost:4000/fear/api/',
14
- test: process.env.REACT_APP_API_BASE_URL_TEST || 'http://localhost:3001/fear/api/',
12
+ production: process.env.API_BASE_URL_PROD || 'http://fear.master.com/fear/api/',
13
+ development: process.env.API_BASE_URL_DEV || 'http://localhost:4000/fear/api/',
14
+ test: process.env.API_BASE_URL_TEST || 'https://fear.dedyn.io/fear/api/',
15
15
  },
16
16
  tokenNames: {
17
17
  bearer: 'Authorization',
@@ -232,6 +232,8 @@ const responseInterceptor = (response) => {
232
232
  requestId: response.config.headers['X-Request-ID'],
233
233
  };
234
234
 
235
+ console.log('Loaded Env = ', process.env);
236
+
235
237
  // Log successful responses in development
236
238
  if (process.env.NODE_ENV === 'development') {
237
239
  console.log(`✅ API Success [${response.status}]:`, {
File without changes
@@ -174,7 +174,7 @@ export function FeatureFactory(entity, reducers = {}, endpoints = null) {
174
174
  reducers,
175
175
  adapter,
176
176
  manager: createReducerManager,
177
- inject: mergeObjects,
177
+ inject: mergeObjects,
178
178
  create: createFactorySlice,
179
179
  // Utility methods
180
180
  getEntityName: () => entity,
File without changes
@@ -219,7 +219,7 @@ export const StateFactory = (namespace, options = {}) => {
219
219
  ...optionalStates,
220
220
  ...config.customFields,
221
221
  };
222
-
222
+ console.log('Initial State :: ', initialState);
223
223
  return initialState;
224
224
  };
225
225
 
@@ -255,13 +255,13 @@ export const ThunkFactory = {
255
255
  validateThunkParams(entity, 'crud');
256
256
 
257
257
  return {
258
- fetchAll: ThunkFactory.create(entity, 'all'),
259
- fetchOne: ThunkFactory.create(entity, 'one'),
258
+ fetch: ThunkFactory.create(entity, 'all'),
259
+ read: ThunkFactory.create(entity, 'one'),
260
260
  create: ThunkFactory.post(entity, 'create'),
261
261
  update: ThunkFactory.put(entity, 'update'),
262
262
  patch: ThunkFactory.patch(entity, 'patch'),
263
263
  delete: ThunkFactory.delete(entity, 'delete'),
264
- search: ThunkFactory.create(entity, 'search'),
264
+ search: ThunkFactory.post(entity, 'search'),
265
265
  };
266
266
  },
267
267
 
@@ -276,8 +276,8 @@ export const ThunkFactory = {
276
276
  * @returns {Object} Standard operations object
277
277
  */
278
278
  getStandardOperations: () => ({ ...STANDARD_OPERATIONS }),
279
+ setApiUrl: (url) => { ThunkFactory.API_URL = url; ThunkFactory.getApiUrl(); },
279
280
  getApiUrl: () => { return ThunkFactory.API_URL },
280
- setApiUrl: (url) => { ThunkFactory.API_URL = url }
281
281
  };
282
282
 
283
283
  export default ThunkFactory;
package/src/index.js CHANGED
File without changes
package/tsup.config.ts CHANGED
File without changes
package/.env DELETED
@@ -1,4 +0,0 @@
1
- GENERATE_SOURCEMAP=false
2
- PORT=4001
3
- NODE_ENV="development"
4
- API_LOCAL="http://fear.master.com:4000/fear/api"