Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
chore: Cherry-pick #19033 to master (#19087)
Cherry-pick #19033 to master

Fixes #19089
  • Loading branch information
mohanarpit committed Dec 21, 2022
2 parents e1117ff + 717664b commit 2dd106e
Show file tree
Hide file tree
Showing 13 changed files with 173 additions and 539 deletions.
5 changes: 1 addition & 4 deletions app/client/src/entities/DataTree/dataTreeJSAction.test.ts
Expand Up @@ -139,6 +139,7 @@ describe("generateDataTreeJSAction", () => {
ENTITY_TYPE: "JSACTION",
body:
"export default {\n\tmyVar1: [],\n\tmyVar2: {},\n\tmyFun1: () => {\n\t\t//write code here\n\t},\n\tmyFun2: async () => {\n\t\t//use async-await or promises\n\t}\n}",

myFun2: {
data: {
users: [{ id: 1, name: "John" }],
Expand All @@ -158,13 +159,11 @@ describe("generateDataTreeJSAction", () => {
arguments: [],
isAsync: true,
confirmBeforeExecute: false,
body: "async () => {\n\t\t//use async-await or promises\n\t}",
},
myFun1: {
arguments: [],
isAsync: false,
confirmBeforeExecute: false,
body: "() => {\n\t\t//write code here\n\t}",
},
},
bindingPaths: {
Expand Down Expand Up @@ -351,13 +350,11 @@ describe("generateDataTreeJSAction", () => {
arguments: [],
isAsync: true,
confirmBeforeExecute: false,
body: "async () => {\n\t\t//use async-await or promises\n\t}",
},
myFun1: {
arguments: [],
isAsync: false,
confirmBeforeExecute: false,
body: "() => {\n\t\t//write code here\n\t}",
},
},
bindingPaths: {
Expand Down
1 change: 0 additions & 1 deletion app/client/src/entities/DataTree/dataTreeJSAction.ts
Expand Up @@ -44,7 +44,6 @@ export const generateDataTreeJSAction = (
arguments: action.actionConfiguration.jsArguments,
isAsync: action.actionConfiguration.isAsync,
confirmBeforeExecute: !!action.confirmBeforeExecute,
body: action.actionConfiguration.body,
};
bindingPaths[action.name] = EvaluationSubstitutionType.SMART_SUBSTITUTE;
dynamicBindingPathList.push({ key: action.name });
Expand Down
1 change: 0 additions & 1 deletion app/client/src/entities/DataTree/types.ts
Expand Up @@ -66,7 +66,6 @@ export interface MetaArgs {
arguments: Variable[];
isAsync: boolean;
confirmBeforeExecute: boolean;
body: string;
}

export interface JSActionEntityConfig {
Expand Down

1 comment on commit 2dd106e

@vercel
Copy link

@vercel vercel bot commented on 2dd106e Dec 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.