In order to unify package names, we decided to use `@appsmith` prefix as a marker to indicate that packages belong to our codebase and that these packages are developed internally. So that we can use this prefix, we need to rename the alias of the same name. But since `@appsmith` is currently being used as an alias for `ee` folder, we have to rename the alias as the first step. Related discussion https://theappsmith.slack.com/archives/CPG2ZTXEY/p1722516279126329 EE PR — https://github.com/appsmithorg/appsmith-ee/pull/4801 ## 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/10267368821> > Commit: 2b00af2d257e4d4304db0a80072afef7513de6be > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10267368821&attempt=2" target="_blank">Cypress dashboard</a>. > Tags: `@tag.All` > Spec: > <hr>Tue, 06 Aug 2024 14:24:22 UTC <!-- end of auto-generated comment: Cypress test results --> ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [x] No
144 lines
3.6 KiB
TypeScript
144 lines
3.6 KiB
TypeScript
import { ReduxActionTypes } from "ee/constants/ReduxActionConstants";
|
|
import type { Log, Message, SourceEntity } from "entities/AppsmithConsole";
|
|
import type { ENTITY_TYPE } from "ee/entities/AppsmithConsole/utils";
|
|
import type {
|
|
CanvasDebuggerState,
|
|
DebuggerContext,
|
|
} from "reducers/uiReducers/debuggerReducer";
|
|
import type { EventName } from "ee/utils/analyticsUtilTypes";
|
|
import type { APP_MODE } from "entities/App";
|
|
|
|
export interface LogDebuggerErrorAnalyticsPayload {
|
|
entityName: string;
|
|
entityId: string;
|
|
entityType: ENTITY_TYPE;
|
|
eventName: EventName;
|
|
propertyPath: string;
|
|
errorId?: string;
|
|
errorMessages?: Message[];
|
|
errorMessage?: Message["message"];
|
|
errorType?: Message["type"];
|
|
errorSubType?: Message["subType"];
|
|
analytics?: Log["analytics"];
|
|
appMode: APP_MODE;
|
|
source: SourceEntity;
|
|
logId: string;
|
|
environmentId?: string;
|
|
environmentName?: string;
|
|
}
|
|
|
|
export type DeleteErrorLogPayload = {
|
|
id: string;
|
|
analytics?: Log["analytics"];
|
|
}[];
|
|
|
|
export const debuggerLogInit = (payload: Log[]) => ({
|
|
type: ReduxActionTypes.DEBUGGER_LOG_INIT,
|
|
payload,
|
|
});
|
|
|
|
export const debuggerLog = (payload: Log[]) => ({
|
|
type: ReduxActionTypes.DEBUGGER_LOG,
|
|
payload,
|
|
});
|
|
|
|
export const clearLogs = () => ({
|
|
type: ReduxActionTypes.CLEAR_DEBUGGER_LOGS,
|
|
});
|
|
|
|
export const showDebugger = (payload?: boolean) => ({
|
|
type: ReduxActionTypes.SHOW_DEBUGGER,
|
|
payload,
|
|
});
|
|
|
|
// Add an error
|
|
export const addErrorLogInit = (payload: Log[]) => ({
|
|
type: ReduxActionTypes.DEBUGGER_ADD_ERROR_LOG_INIT,
|
|
payload,
|
|
});
|
|
|
|
export const addErrorLogs = (payload: Log[]) => ({
|
|
type: ReduxActionTypes.DEBUGGER_ADD_ERROR_LOGS,
|
|
payload,
|
|
});
|
|
|
|
export const deleteErrorLogsInit = (payload: DeleteErrorLogPayload) => ({
|
|
type: ReduxActionTypes.DEBUGGER_DELETE_ERROR_LOG_INIT,
|
|
payload,
|
|
});
|
|
|
|
export const deleteErrorLog = (ids: string[]) => ({
|
|
type: ReduxActionTypes.DEBUGGER_DELETE_ERROR_LOG,
|
|
payload: ids,
|
|
});
|
|
|
|
export const hideDebuggerErrors = (payload: boolean) => ({
|
|
type: ReduxActionTypes.HIDE_DEBUGGER_ERRORS,
|
|
payload,
|
|
});
|
|
|
|
// set the selected tab in the debugger.
|
|
export const setDebuggerSelectedTab = (selectedTab: string) => {
|
|
return {
|
|
type: ReduxActionTypes.SET_DEBUGGER_SELECTED_TAB,
|
|
selectedTab,
|
|
};
|
|
};
|
|
|
|
// set the selected filter in the debugger.
|
|
export const setDebuggerSelectedFilter = (selectedFilter: string) => {
|
|
return {
|
|
type: ReduxActionTypes.SET_DEBUGGER_SELECTED_FILTER,
|
|
selectedFilter,
|
|
};
|
|
};
|
|
|
|
// set the height of the response pane in the debugger.
|
|
export const setResponsePaneHeight = (height: number) => {
|
|
return {
|
|
type: ReduxActionTypes.SET_RESPONSE_PANE_HEIGHT,
|
|
height,
|
|
};
|
|
};
|
|
|
|
// set the height of the response pane in the debugger.
|
|
export const setErrorCount = (count: number) => {
|
|
return {
|
|
type: ReduxActionTypes.SET_ERROR_COUNT,
|
|
count,
|
|
};
|
|
};
|
|
|
|
// set the height of the response pane in the debugger.
|
|
export const setResponsePaneScrollPosition = (position: number) => {
|
|
return {
|
|
type: ReduxActionTypes.SET_RESPONSE_PANE_SCROLL_POSITION,
|
|
position,
|
|
};
|
|
};
|
|
|
|
//toggle expand error log item state.
|
|
export const toggleExpandErrorLogItem = (id: string, isExpanded: boolean) => {
|
|
return {
|
|
type: ReduxActionTypes.TOGGLE_EXPAND_ERROR_LOG_ITEM,
|
|
payload: { id, isExpanded },
|
|
};
|
|
};
|
|
|
|
//set the debugger context in store.
|
|
export const setDebuggerContext = (context: DebuggerContext) => {
|
|
return {
|
|
type: ReduxActionTypes.SET_DEBUGGER_CONTEXT,
|
|
payload: { context },
|
|
};
|
|
};
|
|
|
|
export const setCanvasDebuggerState = (
|
|
payload: Partial<CanvasDebuggerState>,
|
|
) => {
|
|
return {
|
|
type: ReduxActionTypes.SET_CANVAS_DEBUGGER_STATE,
|
|
payload,
|
|
};
|
|
};
|