Fix typescript build

This commit is contained in:
Elias Meire 2024-08-29 10:18:34 +02:00
parent 97391df49d
commit 6f15aa6a88
No known key found for this signature in database
3 changed files with 3 additions and 7 deletions

View file

@ -506,14 +506,9 @@ export class Ftp implements INodeType {
let returnItems: INodeExecutionData[] = [];
const operation = this.getNodeParameter('operation', 0);
let credentials: ICredentialDataDecryptedObject | undefined = undefined;
const protocol = this.getNodeParameter('protocol', 0) as string;
const credentials = await this.getCredentials(protocol === 'sftp' ? 'sftp' : 'ftp');
if (protocol === 'sftp') {
credentials = await this.getCredentials('sftp');
} else {
credentials = await this.getCredentials('ftp');
}
let ftp: ftpClient;
let sftp: sftpClient;

View file

@ -5,6 +5,7 @@
"tsBuildInfoFile": "dist/build.tsbuildinfo"
},
"include": [
"types.d.ts",
"credentials/**/*.ts",
"nodes/**/*.ts",
"nodes/**/*.json",

View file

@ -24,7 +24,7 @@ class CredentialSchemaRootObject<
S extends ZodType | null,
T extends { [k: string]: CredentialSchemaProperty<M, S> } = {},
> {
constructor(private shape: T) {}
constructor(public shape: T) {}
validate<Data>(data: Data) {
return this.toZodSchema().safeParse(data);