refactor: Remove test run methods from triggers
This commit is contained in:
@@ -23,8 +23,4 @@ export default {
|
|||||||
lastInternalId: $.flow.lastInternalId,
|
lastInternalId: $.flow.lastInternalId,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
async testRun($: IGlobalVariable) {
|
|
||||||
return await getUserTweets($, { currentUser: true });
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
@@ -20,8 +20,4 @@ export default {
|
|||||||
async run($: IGlobalVariable) {
|
async run($: IGlobalVariable) {
|
||||||
return await myFollowers($, $.flow.lastInternalId);
|
return await myFollowers($, $.flow.lastInternalId);
|
||||||
},
|
},
|
||||||
|
|
||||||
async testRun($: IGlobalVariable) {
|
|
||||||
return await myFollowers($);
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
@@ -35,10 +35,4 @@ export default {
|
|||||||
searchTerm: $.step.parameters.searchTerm as string,
|
searchTerm: $.step.parameters.searchTerm as string,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
async testRun($: IGlobalVariable) {
|
|
||||||
return await searchTweets($, {
|
|
||||||
searchTerm: $.step.parameters.searchTerm as string,
|
|
||||||
});
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
@@ -36,11 +36,4 @@ export default {
|
|||||||
lastInternalId: $.flow.lastInternalId,
|
lastInternalId: $.flow.lastInternalId,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
async testRun($: IGlobalVariable) {
|
|
||||||
return await getUserTweets($, {
|
|
||||||
currentUser: false,
|
|
||||||
userId: $.step.parameters.username as string,
|
|
||||||
});
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
3
packages/types/index.d.ts
vendored
3
packages/types/index.d.ts
vendored
@@ -208,7 +208,6 @@ export interface ITrigger {
|
|||||||
substeps: ISubstep[];
|
substeps: ISubstep[];
|
||||||
getInterval(parameters: IGlobalVariable['step']['parameters']): string;
|
getInterval(parameters: IGlobalVariable['step']['parameters']): string;
|
||||||
run($: IGlobalVariable): Promise<ITriggerOutput>;
|
run($: IGlobalVariable): Promise<ITriggerOutput>;
|
||||||
testRun($: IGlobalVariable): Promise<ITriggerOutput>;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IActionOutput {
|
export interface IActionOutput {
|
||||||
@@ -271,7 +270,7 @@ export type IGlobalVariable = {
|
|||||||
execution?: {
|
execution?: {
|
||||||
id: string;
|
id: string;
|
||||||
testRun: boolean;
|
testRun: boolean;
|
||||||
}
|
};
|
||||||
process?: (triggerDataItem: ITriggerDataItem) => Promise<void>;
|
process?: (triggerDataItem: ITriggerDataItem) => Promise<void>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user