mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
feat(Simulate Node): New node (no-changelog) (#9109)
This commit is contained in:
26
packages/nodes-base/nodes/Simulate/methods/loadOptions.ts
Normal file
26
packages/nodes-base/nodes/Simulate/methods/loadOptions.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
import type { ILoadOptionsFunctions, INodePropertyOptions } from 'n8n-workflow';
|
||||
|
||||
export async function getNodeTypes(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
|
||||
const types = this.getKnownNodeTypes() as {
|
||||
[key: string]: {
|
||||
className: string;
|
||||
};
|
||||
};
|
||||
|
||||
const returnData: INodePropertyOptions[] = [];
|
||||
|
||||
let typeNames = Object.keys(types);
|
||||
|
||||
if (this.getNode().type === 'n8n-nodes-base.simulateTrigger') {
|
||||
typeNames = typeNames.filter((type) => type.toLowerCase().includes('trigger'));
|
||||
}
|
||||
|
||||
for (const type of typeNames) {
|
||||
returnData.push({
|
||||
name: types[type].className,
|
||||
value: type,
|
||||
});
|
||||
}
|
||||
|
||||
return returnData;
|
||||
}
|
||||
Reference in New Issue
Block a user