Skip to content

Commit a619db5

Browse files
authored
chore: Move existing middlewares to a middlewares folder and added pass through middleware for packages (#39410)
## Description Move middlewares to a new folder and added an ee specific middleware `app/client/src/ee/middlewares/PackageMiddleware.ts`. This will eventually be added to the store but as of now it is detached since the functionality is incomplete. It will be extended in EE PR for appsmithorg/appsmith-ee#6324 ## Automation /ok-to-test tags="@tag.All" ### 🔍 Cypress test results <!-- This is an auto-generated comment: Cypress test results --> > [!TIP] > 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉 > Workflow run: <https://github.com/appsmithorg/appsmith/actions/runs/13493097420> > Commit: a0a94db > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=13493097420&attempt=1" target="_blank">Cypress dashboard</a>. > Tags: `@tag.All` > Spec: > <hr>Mon, 24 Feb 2025 08:58:32 UTC <!-- end of auto-generated comment: Cypress test results --> ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [ ] No <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced an enterprise middleware that enhances package-specific functionality. - **Refactor** - Improved internal integration by adjusting module access and reorganizing route handling. - Updated import paths and consolidated middleware components to streamline application structure. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent 9b40482 commit a619db5

File tree

6 files changed

+14
-5
lines changed

6 files changed

+14
-5
lines changed

app/client/src/ce/reducers/entityReducers/canvasWidgetsReducer.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export type FlattenedWidgetProps<orType = never> =
3939
* @param updateLayoutDiff
4040
* @returns list of widgets that were updated
4141
*/
42-
function getUpdatedWidgetLists(
42+
export function getUpdatedWidgetLists(
4343
updateLayoutDiff: Diff<
4444
CanvasWidgetsReduxState,
4545
{

app/client/src/ee/RouteParamsMiddleware.ts

-3
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import type { Middleware } from "redux";
2+
3+
// This middleware is extended in EE to add package specific logic
4+
const PackageMiddleware: Middleware = () => (next) => (action) => {
5+
// Simply pass the action to the next middleware/reducer
6+
return next(action);
7+
};
8+
9+
export default PackageMiddleware;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export * from "ce/middlewares/RouteParamsMiddleware";
2+
import { default as EE_RouteParamsMiddleware } from "ce/middlewares/RouteParamsMiddleware";
3+
export default EE_RouteParamsMiddleware;

app/client/src/store.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { rootSaga } from "ee/sagas";
77
import { composeWithDevTools } from "redux-devtools-extension/logOnlyInProduction";
88
import * as Sentry from "@sentry/react";
99
import { ReduxActionTypes } from "ee/constants/ReduxActionConstants";
10-
import routeParamsMiddleware from "ee/RouteParamsMiddleware";
10+
import routeParamsMiddleware from "ee/middlewares/RouteParamsMiddleware";
1111

1212
const sagaMiddleware = createSagaMiddleware();
1313
const ignoredSentryActionTypes = [

0 commit comments

Comments
 (0)