mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
fix typecheck errors
This commit is contained in:
parent
71f13ab240
commit
49f3f61676
|
@ -67,7 +67,7 @@ function endpointCtxExpr(ctx: ICtx, endpoint: string): string {
|
||||||
|
|
||||||
return endpoint.replace(
|
return endpoint.replace(
|
||||||
/({{ *(access_token|dtable_uuid|server) *}})/g,
|
/({{ *(access_token|dtable_uuid|server) *}})/g,
|
||||||
(match: string, expr: string, name: TEndpointVariableName) => {
|
(match: string, name: TEndpointVariableName) => {
|
||||||
return endpointVariables[name] || match;
|
return endpointVariables[name] || match;
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
@ -227,7 +227,7 @@ export const split = (subject: string): string[] =>
|
||||||
normalize(subject)
|
normalize(subject)
|
||||||
.split(/\s*((?:[^\\,]*?(?:\\[\s\S])*)*?)\s*(?:,|$)/)
|
.split(/\s*((?:[^\\,]*?(?:\\[\s\S])*)*?)\s*(?:,|$)/)
|
||||||
.filter((s) => s.length)
|
.filter((s) => s.length)
|
||||||
.map((s) => s.replace(/\\([\s\S])/gm, ($0, $1) => $1));
|
.map((s) => s.replace(/\\([\s\S])/gm, (_, $1) => $1));
|
||||||
|
|
||||||
export function columnNamesToArray(columnNames: string): string[] {
|
export function columnNamesToArray(columnNames: string): string[] {
|
||||||
return columnNames ? split(columnNames).filter(nonInternalPredicate).filter(uniquePredicate) : [];
|
return columnNames ? split(columnNames).filter(nonInternalPredicate).filter(uniquePredicate) : [];
|
||||||
|
|
|
@ -67,7 +67,7 @@ function endpointCtxExpr(ctx: ICtx, endpoint: string): string {
|
||||||
|
|
||||||
return endpoint.replace(
|
return endpoint.replace(
|
||||||
/({{ *(access_token|dtable_uuid|server) *}})/g,
|
/({{ *(access_token|dtable_uuid|server) *}})/g,
|
||||||
(match: string, expr: string, name: TEndpointVariableName) => {
|
(match: string, name: TEndpointVariableName) => {
|
||||||
// I need expr. Why?
|
// I need expr. Why?
|
||||||
return (endpointVariables[name] as string) || match;
|
return (endpointVariables[name] as string) || match;
|
||||||
},
|
},
|
||||||
|
@ -193,7 +193,7 @@ export const split = (subject: string): string[] =>
|
||||||
normalize(subject)
|
normalize(subject)
|
||||||
.split(/\s*((?:[^\\,]*?(?:\\[\s\S])*)*?)\s*(?:,|$)/)
|
.split(/\s*((?:[^\\,]*?(?:\\[\s\S])*)*?)\s*(?:,|$)/)
|
||||||
.filter((s) => s.length)
|
.filter((s) => s.length)
|
||||||
.map((s) => s.replace(/\\([\s\S])/gm, ($0, $1) => $1));
|
.map((s) => s.replace(/\\([\s\S])/gm, (_, $1) => $1));
|
||||||
|
|
||||||
// INTERNAL: get collaborator info from @auth.local address
|
// INTERNAL: get collaborator info from @auth.local address
|
||||||
function getCollaboratorInfo(
|
function getCollaboratorInfo(
|
||||||
|
|
|
@ -1,10 +1,7 @@
|
||||||
import type { IExecuteFunctions, IDataObject, INodeExecutionData } from 'n8n-workflow';
|
import type { IExecuteFunctions, IDataObject, INodeExecutionData } from 'n8n-workflow';
|
||||||
import { seaTableApiRequest } from '../../../GenericFunctions';
|
import { seaTableApiRequest } from '../../../GenericFunctions';
|
||||||
|
|
||||||
export async function metadata(
|
export async function metadata(this: IExecuteFunctions): Promise<INodeExecutionData[]> {
|
||||||
this: IExecuteFunctions,
|
|
||||||
index: number,
|
|
||||||
): Promise<INodeExecutionData[]> {
|
|
||||||
const responseData = await seaTableApiRequest.call(
|
const responseData = await seaTableApiRequest.call(
|
||||||
this,
|
this,
|
||||||
{},
|
{},
|
||||||
|
|
|
@ -1,10 +1,7 @@
|
||||||
import type { IExecuteFunctions, IDataObject, INodeExecutionData } from 'n8n-workflow';
|
import type { IExecuteFunctions, IDataObject, INodeExecutionData } from 'n8n-workflow';
|
||||||
import { seaTableApiRequest } from '../../../GenericFunctions';
|
import { seaTableApiRequest } from '../../../GenericFunctions';
|
||||||
|
|
||||||
export async function snapshot(
|
export async function snapshot(this: IExecuteFunctions): Promise<INodeExecutionData[]> {
|
||||||
this: IExecuteFunctions,
|
|
||||||
index: number,
|
|
||||||
): Promise<INodeExecutionData[]> {
|
|
||||||
const responseData = await seaTableApiRequest.call(
|
const responseData = await seaTableApiRequest.call(
|
||||||
this,
|
this,
|
||||||
{},
|
{},
|
||||||
|
|
Loading…
Reference in a new issue