From 410b1249c2c722c884e275f2af6fd6e9f1f1a1cb Mon Sep 17 00:00:00 2001 From: Pravesh-mansharamani Date: Thu, 15 Jun 2023 21:00:19 +0530 Subject: [PATCH] fixed the prettier error --- .../nodes/documentloaders/Figma/Figma.ts | 144 +++++++++--------- 1 file changed, 72 insertions(+), 72 deletions(-) diff --git a/packages/components/nodes/documentloaders/Figma/Figma.ts b/packages/components/nodes/documentloaders/Figma/Figma.ts index 480c834d..388c4ee0 100644 --- a/packages/components/nodes/documentloaders/Figma/Figma.ts +++ b/packages/components/nodes/documentloaders/Figma/Figma.ts @@ -1,81 +1,81 @@ -import { INode, INodeData, INodeParams } from '../../../src/Interface'; -import { FigmaFileLoader, FigmaLoaderParams } from 'langchain/document_loaders/web/figma'; +import { INode, INodeData, INodeParams } from '../../../src/Interface' +import { FigmaFileLoader, FigmaLoaderParams } from 'langchain/document_loaders/web/figma' class Figma_DocumentLoaders implements INode { - label: string; - name: string; - description: string; - type: string; - icon: string; - category: string; - baseClasses: string[]; - inputs: INodeParams[]; + label: string + name: string + description: string + type: string + icon: string + category: string + baseClasses: string[] + inputs: INodeParams[] - constructor() { - this.label = 'Figma'; - this.name = 'figma'; - this.type = 'Document'; - this.icon = 'figma.png'; - this.category = 'Document Loaders'; - this.description = 'Load data from a Figma file'; - this.baseClasses = [this.type]; - this.inputs = [ - { - label: 'Access Token', - name: 'accessToken', - type: 'password', - placeholder: '', - }, - { - label: 'File Key', - name: 'fileKey', - type: 'string', - placeholder: 'key', - }, - { - label: 'Node IDs', - name: 'nodeIds', - type: 'string', - placeholder: '0, 1, 2', - }, - { - label: 'Recursive', - name: 'recursive', - type: 'boolean', - optional: true - }, - { - label: 'Text Splitter', - name: 'textSplitter', - type: 'TextSplitter', - optional: true - }, - { - label: 'Metadata', - name: 'metadata', - type: 'json', - optional: true, - additionalParams: true - } - ]; - } + constructor() { + this.label = 'Figma' + this.name = 'figma' + this.type = 'Document' + this.icon = 'figma.png' + this.category = 'Document Loaders' + this.description = 'Load data from a Figma file' + this.baseClasses = [this.type] + this.inputs = [ + { + label: 'Access Token', + name: 'accessToken', + type: 'password', + placeholder: '' + }, + { + label: 'File Key', + name: 'fileKey', + type: 'string', + placeholder: 'key' + }, + { + label: 'Node IDs', + name: 'nodeIds', + type: 'string', + placeholder: '0, 1, 2' + }, + { + label: 'Recursive', + name: 'recursive', + type: 'boolean', + optional: true + }, + { + label: 'Text Splitter', + name: 'textSplitter', + type: 'TextSplitter', + optional: true + }, + { + label: 'Metadata', + name: 'metadata', + type: 'json', + optional: true, + additionalParams: true + } + ] + } - async init(nodeData: INodeData): Promise { - const accessToken = nodeData.inputs?.accessToken as string; - const nodeIds = (nodeData.inputs?.nodeIds as string)?.split(',') || []; - const fileKey = nodeData.inputs?.fileKey as string; + async init(nodeData: INodeData): Promise { + const accessToken = nodeData.inputs?.accessToken as string + const nodeIds = (nodeData.inputs?.nodeIds as string)?.split(',') || [] + const fileKey = nodeData.inputs?.fileKey as string - const options: FigmaLoaderParams = { - accessToken, - nodeIds, - fileKey, - }; + const options: FigmaLoaderParams = { + accessToken, + nodeIds, + fileKey + } - const loader = new FigmaFileLoader(options); - const docs = await loader.load(); + const loader = new FigmaFileLoader(options) + const docs = await loader.load() - return docs; - } + return docs + } } -module.exports = { nodeClass: Figma_DocumentLoaders }; +module.exports = { nodeClass: Figma_DocumentLoaders }