ci: Fix linting issues (no-changelog) (#6788)

* ci: Fix linting (no-changelog)

* lintfix for nodes-base as well
This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™ 2023-07-28 18:28:17 +02:00 committed by GitHub
parent 4e491b754f
commit 6fb8a9ee39
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
40 changed files with 204 additions and 154 deletions

View file

@ -52,7 +52,7 @@
"nock": "^13.3.2",
"nodemon": "^3.0.1",
"p-limit": "^3.1.0",
"prettier": "*",
"prettier": "^3.0.0",
"rimraf": "^5.0.1",
"run-script-os": "^1.0.7",
"start-server-and-test": "^2.0.0",
@ -73,7 +73,6 @@
"@types/node": "^18.16.16",
"chokidar": "3.5.2",
"jsonwebtoken": "9.0.0",
"prettier": "^3.0.0",
"semver": "^7.5.4",
"tough-cookie": "^4.1.3",
"tslib": "^2.6.1",

View file

@ -18,7 +18,14 @@ module.exports = {
// TODO: Remove this
'import/no-cycle': 'warn',
'import/order': 'off',
'import/extensions': 'off',
'import/extensions': 'warn',
'@typescript-eslint/ban-ts-comment': ['warn', { 'ts-ignore': true }],
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-base-to-string': 'warn',
'@typescript-eslint/prefer-nullish-coalescing': 'warn',
'@typescript-eslint/no-redundant-type-constituents': 'warn',
'@typescript-eslint/ban-types': 'warn',
'@typescript-eslint/no-unsafe-enum-comparison': 'warn',
'@typescript-eslint/no-unsafe-declaration-merging': 'warn',
},
};

View file

@ -58,13 +58,16 @@ import type { WorkflowEntity } from '@db/entities/WorkflowEntity';
import type { WebhookEntity } from '@db/entities/WebhookEntity';
import { ActiveExecutions } from '@/ActiveExecutions';
import { createErrorExecution } from '@/GenericHelpers';
import { WORKFLOW_REACTIVATE_INITIAL_TIMEOUT, WORKFLOW_REACTIVATE_MAX_TIMEOUT } from '@/constants';
import {
STARTING_NODES,
WORKFLOW_REACTIVATE_INITIAL_TIMEOUT,
WORKFLOW_REACTIVATE_MAX_TIMEOUT,
} from '@/constants';
import { NodeTypes } from '@/NodeTypes';
import { WorkflowRunner } from '@/WorkflowRunner';
import { ExternalHooks } from '@/ExternalHooks';
import { whereClause } from './UserManagement/UserManagementHelper';
import { WorkflowsService } from './workflows/workflows.services';
import { STARTING_NODES } from './constants';
import { webhookNotFoundErrorMessage } from './utils';
import { In } from 'typeorm';
import { WebhookRepository } from '@db/repositories';

View file

@ -172,7 +172,7 @@ export class CredentialsHelper extends ICredentialsHelper {
(property) => property.type === 'hidden' && property?.typeOptions?.expirable === true,
);
if (expirableProperty === undefined || expirableProperty.name === undefined) {
if (expirableProperty?.name === undefined) {
return undefined;
}

View file

@ -1,6 +1,6 @@
import config from '@/config';
import type { ICredentialDataDecryptedObject, ICredentialTypes } from 'n8n-workflow';
import { deepCopy, LoggerProxy as Logger, jsonParse } from 'n8n-workflow';
import type { ICredentialDataDecryptedObject } from 'n8n-workflow';
import { deepCopy, LoggerProxy as Logger, jsonParse, ICredentialTypes } from 'n8n-workflow';
import type { ICredentialsOverwrite } from '@/Interfaces';
class CredentialsOverwritesClass {

View file

@ -35,7 +35,10 @@ export class TestWebhooks {
};
} = {};
constructor(private activeWebhooks: ActiveWebhooks, private push: Push) {
constructor(
private activeWebhooks: ActiveWebhooks,
private push: Push,
) {
activeWebhooks.testWebhooks = true;
}

View file

@ -16,7 +16,10 @@ import { ExecutionRepository } from '@db/repositories';
@Service()
export class WaitingWebhooks {
constructor(private nodeTypes: NodeTypes, private executionRepository: ExecutionRepository) {}
constructor(
private nodeTypes: NodeTypes,
private executionRepository: ExecutionRepository,
) {}
async executeWebhook(
httpMethod: WebhookHttpMethod,

View file

@ -70,11 +70,7 @@ export class Execute extends BaseCommand {
// Do a basic check if the data in the file looks right
// TODO: Later check with the help of TypeScript data if it is valid or not
if (
workflowData === null ||
workflowData.nodes === undefined ||
workflowData.connections === undefined
) {
if (workflowData?.nodes === undefined || workflowData.connections === undefined) {
this.logger.info(`The file "${flags.file}" does not contain valid workflow data.`);
return;
}

View file

@ -17,7 +17,10 @@ export declare namespace TranslationRequest {
@Authorized()
@RestController('/')
export class TranslationController {
constructor(private config: Config, private credentialTypes: ICredentialTypes) {}
constructor(
private config: Config,
private credentialTypes: ICredentialTypes,
) {}
@Get('/credential-translation')
async getCredentialTranslation(req: TranslationRequest.Credential) {

View file

@ -3,7 +3,7 @@ import { DateTime } from 'luxon';
import type { EventMessageTypeNames, JsonObject } from 'n8n-workflow';
import { v4 as uuid } from 'uuid';
import type { AbstractEventPayload } from './AbstractEventPayload';
import type { AbstractEventMessageOptions } from './AbstractEventMessageOptions';
import { AbstractEventMessageOptions } from './AbstractEventMessageOptions';
import type { EventNamesTypes } from '.';
function modifyUnderscoredKeys(

View file

@ -1,12 +1,17 @@
import { v4 as uuid } from 'uuid';
import type { INodeCredentials, MessageEventBusDestinationOptions } from 'n8n-workflow';
import { LoggerProxy, MessageEventBusDestinationTypeNames } from 'n8n-workflow';
import type { INodeCredentials } from 'n8n-workflow';
import {
LoggerProxy,
MessageEventBusDestinationTypeNames,
MessageEventBusDestinationOptions,
} from 'n8n-workflow';
import * as Db from '@/Db';
import type { AbstractEventMessage } from '../EventMessageClasses/AbstractEventMessage';
import type { EventMessageTypes } from '../EventMessageClasses';
import type { DeleteResult, InsertResult } from 'typeorm';
import type { EventMessageConfirmSource } from '../EventMessageClasses/EventMessageConfirm';
import type { MessageEventBus, MessageWithCallback } from '../MessageEventBus/MessageEventBus';
import { MessageEventBus } from '../MessageEventBus/MessageEventBus';
import type { MessageWithCallback } from '../MessageEventBus/MessageEventBus';
export abstract class MessageEventBusDestination implements MessageEventBusDestinationOptions {
// Since you can't have static abstract functions - this just serves as a reminder that you need to implement these. Please.

View file

@ -3,15 +3,17 @@
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
import { MessageEventBusDestination } from './MessageEventBusDestination.ee';
import * as Sentry from '@sentry/node';
import { LoggerProxy, MessageEventBusDestinationTypeNames } from 'n8n-workflow';
import type {
MessageEventBusDestinationOptions,
import {
LoggerProxy,
MessageEventBusDestinationTypeNames,
MessageEventBusDestinationSentryOptions,
} from 'n8n-workflow';
import type { MessageEventBusDestinationOptions } from 'n8n-workflow';
import { isLogStreamingEnabled } from '../MessageEventBus/MessageEventBusHelper';
import { eventMessageGenericDestinationTestEvent } from '../EventMessageClasses/EventMessageGeneric';
import { N8N_VERSION } from '@/constants';
import type { MessageEventBus, MessageWithCallback } from '../MessageEventBus/MessageEventBus';
import { MessageEventBus } from '../MessageEventBus/MessageEventBus';
import type { MessageWithCallback } from '../MessageEventBus/MessageEventBus';
export const isMessageEventBusDestinationSentryOptions = (
candidate: unknown,

View file

@ -2,15 +2,17 @@
/* eslint-disable @typescript-eslint/no-non-null-assertion */
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
import syslog from 'syslog-client';
import type {
MessageEventBusDestinationOptions,
import type { MessageEventBusDestinationOptions } from 'n8n-workflow';
import {
LoggerProxy,
MessageEventBusDestinationTypeNames,
MessageEventBusDestinationSyslogOptions,
} from 'n8n-workflow';
import { LoggerProxy, MessageEventBusDestinationTypeNames } from 'n8n-workflow';
import { MessageEventBusDestination } from './MessageEventBusDestination.ee';
import { isLogStreamingEnabled } from '../MessageEventBus/MessageEventBusHelper';
import { eventMessageGenericDestinationTestEvent } from '../EventMessageClasses/EventMessageGeneric';
import type { MessageEventBus, MessageWithCallback } from '../MessageEventBus/MessageEventBus';
import { MessageEventBus } from '../MessageEventBus/MessageEventBus';
import type { MessageWithCallback } from '../MessageEventBus/MessageEventBus';
export const isMessageEventBusDestinationSyslogOptions = (
candidate: unknown,

View file

@ -40,7 +40,10 @@ export class Telemetry {
private executionCountsBuffer: IExecutionsBuffer = {};
constructor(private postHog: PostHogClient, private license: License) {}
constructor(
private postHog: PostHogClient,
private license: License,
) {}
setInstanceId(instanceId: string) {
this.instanceId = instanceId;
@ -70,9 +73,12 @@ export class Telemetry {
}
private startPulse() {
this.pulseIntervalReference = setInterval(async () => {
this.pulseIntervalReference = setInterval(
async () => {
void this.pulse();
}, 6 * 60 * 60 * 1000); // every 6 hours
},
6 * 60 * 60 * 1000,
); // every 6 hours
}
private async pulse(): Promise<unknown> {

View file

@ -169,8 +169,7 @@ workflowsController.get(
// Do a very basic check if it is really a n8n-workflow-json
if (
workflowData === undefined ||
workflowData.nodes === undefined ||
workflowData?.nodes === undefined ||
!Array.isArray(workflowData.nodes) ||
workflowData.connections === undefined ||
typeof workflowData.connections !== 'object' ||

View file

@ -90,9 +90,8 @@ export class EEWorkflowsService extends WorkflowsService {
}
static addOwnerId(workflow: WorkflowForList, workflowOwnerRole: Role): void {
const ownerId = workflow.shared?.find(
({ roleId }) => String(roleId) === workflowOwnerRole.id,
)?.userId;
const ownerId = workflow.shared?.find(({ roleId }) => String(roleId) === workflowOwnerRole.id)
?.userId;
workflow.ownedBy = ownerId ? { id: ownerId } : null;
delete workflow.shared;
}

View file

@ -577,7 +577,7 @@ export const getBootstrapDBOptions = (type: TestDBType) =>
name: type,
database: type,
...baseOptions(type),
} as const);
}) as const;
const getDBOptions = (type: TestDBType, name: string) => ({
type,

View file

@ -185,7 +185,7 @@ export class BinaryDataManager {
}
async duplicateBinaryData(
inputData: Array<INodeExecutionData[] | null> | unknown,
inputData: Array<INodeExecutionData[] | null>,
executionId: string,
): Promise<INodeExecutionData[][]> {
if (inputData && this.managers[this.binaryDataMode]) {

View file

@ -77,7 +77,7 @@ export async function getEncryptionKey(): Promise<string> {
const userSettings = await getUserSettings();
if (userSettings === undefined || userSettings.encryptionKey === undefined) {
if (userSettings?.encryptionKey === undefined) {
throw new Error(RESPONSE_ERROR_MESSAGES.NO_ENCRYPTION_KEY);
}

View file

@ -12,13 +12,13 @@ module.exports = {
'n8n-local-rules/dangerously-use-html-string-missing': 'off',
// TODO: Remove these
'import/no-default-export': 'off',
'import/no-default-export': 'warn',
'import/order': 'off',
'@typescript-eslint/no-unsafe-argument': 'warn',
'@typescript-eslint/no-unsafe-return': 'warn',
'@typescript-eslint/no-unsafe-member-access': 'warn',
'@typescript-eslint/prefer-optional-chain': 'off',
'@typescript-eslint/prefer-nullish-coalescing': 'off',
'@typescript-eslint/prefer-optional-chain': 'warn',
'@typescript-eslint/prefer-nullish-coalescing': 'warn',
},
overrides: [

View file

@ -10,45 +10,45 @@ module.exports = {
rules: {
// TODO: Remove these
'id-denylist': 'off',
'import/extensions': 'off',
'import/no-default-export': 'off',
'import/no-extraneous-dependencies': 'off',
'id-denylist': 'warn',
'import/extensions': 'warn',
'import/no-default-export': 'warn',
'import/no-extraneous-dependencies': 'warn',
'import/order': 'off',
'import/no-cycle': 'warn',
'import/no-duplicates': 'off',
indent: 'off',
'@typescript-eslint/ban-types': 'off',
'@typescript-eslint/dot-notation': 'off',
'@typescript-eslint/lines-between-class-members': 'off',
'@typescript-eslint/member-delimiter-style': 'off',
'@typescript-eslint/naming-convention': 'off',
'@typescript-eslint/no-empty-interface': 'off',
'@typescript-eslint/no-for-in-array': 'off',
'@typescript-eslint/no-loop-func': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-shadow': 'off',
'@typescript-eslint/no-this-alias': 'off',
'@typescript-eslint/no-unnecessary-boolean-literal-compare': 'off',
'@typescript-eslint/no-unnecessary-type-assertion': 'off',
'@typescript-eslint/no-unsafe-argument': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unsafe-return': 'off',
'@typescript-eslint/no-unused-expressions': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/prefer-nullish-coalescing': 'off',
'@typescript-eslint/prefer-optional-chain': 'off',
'@typescript-eslint/restrict-plus-operands': 'off',
'@typescript-eslint/restrict-template-expressions': 'off',
'@typescript-eslint/unbound-method': 'off',
'import/no-duplicates': 'warn',
indent: 'warn',
'@typescript-eslint/ban-types': 'warn',
'@typescript-eslint/dot-notation': 'warn',
'@typescript-eslint/lines-between-class-members': 'warn',
'@typescript-eslint/member-delimiter-style': 'warn',
'@typescript-eslint/naming-convention': 'warn',
'@typescript-eslint/no-empty-interface': 'warn',
'@typescript-eslint/no-for-in-array': 'warn',
'@typescript-eslint/no-loop-func': 'warn',
'@typescript-eslint/no-non-null-assertion': 'warn',
'@typescript-eslint/no-shadow': 'warn',
'@typescript-eslint/no-this-alias': 'warn',
'@typescript-eslint/no-unnecessary-boolean-literal-compare': 'warn',
'@typescript-eslint/no-unnecessary-type-assertion': 'warn',
'@typescript-eslint/no-unsafe-argument': 'warn',
'@typescript-eslint/no-unsafe-assignment': 'warn',
'@typescript-eslint/no-unsafe-call': 'warn',
'@typescript-eslint/no-unsafe-member-access': 'warn',
'@typescript-eslint/no-unsafe-return': 'warn',
'@typescript-eslint/no-unused-expressions': 'warn',
'@typescript-eslint/no-unused-vars': 'warn',
'@typescript-eslint/no-use-before-define': 'warn',
'@typescript-eslint/no-var-requires': 'warn',
'@typescript-eslint/prefer-nullish-coalescing': 'warn',
'@typescript-eslint/prefer-optional-chain': 'warn',
'@typescript-eslint/restrict-plus-operands': 'warn',
'@typescript-eslint/restrict-template-expressions': 'warn',
'@typescript-eslint/unbound-method': 'warn',
'@typescript-eslint/ban-ts-comment': ['warn', { 'ts-ignore': true }],
'@typescript-eslint/no-redundant-type-constituents': 'off',
'@typescript-eslint/no-base-to-string': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unsafe-enum-comparison': 'off',
'@typescript-eslint/no-redundant-type-constituents': 'warn',
'@typescript-eslint/no-base-to-string': 'warn',
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-unsafe-enum-comparison': 'warn',
},
};

View file

@ -65,7 +65,7 @@
"n8n-workflow": "workspace:*",
"normalize-wheel": "^1.0.1",
"pinia": "^2.1.6",
"prettier": "*",
"prettier": "^3.0.0",
"stream-browserify": "^3.0.0",
"timeago.js": "^4.0.2",
"uuid": "^8.3.2",

View file

@ -12,25 +12,31 @@ module.exports = {
rules: {
// TODO: remove all the following rules
eqeqeq: 'off',
'id-denylist': 'off',
'import/extensions': 'off',
'import/order': 'off',
'prefer-spread': 'off',
'import/no-extraneous-dependencies': 'off',
eqeqeq: 'warn',
'id-denylist': 'warn',
'import/extensions': 'warn',
'import/order': 'warn',
'prefer-spread': 'warn',
'import/no-extraneous-dependencies': 'warn',
'@typescript-eslint/naming-convention': ['error', { selector: 'memberLike', format: null }],
'@typescript-eslint/no-explicit-any': 'off', //812 warnings, better to fix in separate PR
'@typescript-eslint/no-non-null-assertion': 'off', //665 errors, better to fix in separate PR
'@typescript-eslint/no-unsafe-assignment': 'off', //7084 problems, better to fix in separate PR
'@typescript-eslint/no-unsafe-call': 'off', //541 errors, better to fix in separate PR
'@typescript-eslint/no-unsafe-member-access': 'off', //4591 errors, better to fix in separate PR
'@typescript-eslint/no-unsafe-return': 'off', //438 errors, better to fix in separate PR
'@typescript-eslint/no-explicit-any': 'warn', //812 warnings, better to fix in separate PR
'@typescript-eslint/no-non-null-assertion': 'warn', //665 errors, better to fix in separate PR
'@typescript-eslint/no-unsafe-assignment': 'warn', //7084 problems, better to fix in separate PR
'@typescript-eslint/no-unsafe-call': 'warn', //541 errors, better to fix in separate PR
'@typescript-eslint/no-unsafe-member-access': 'warn', //4591 errors, better to fix in separate PR
'@typescript-eslint/no-unsafe-return': 'warn', //438 errors, better to fix in separate PR
'@typescript-eslint/no-unused-expressions': ['error', { allowTernary: true }],
'@typescript-eslint/restrict-template-expressions': 'off', //1152 errors, better to fix in separate PR
'@typescript-eslint/unbound-method': 'off',
'@typescript-eslint/restrict-template-expressions': 'warn', //1152 errors, better to fix in separate PR
'@typescript-eslint/unbound-method': 'warn',
'@typescript-eslint/ban-ts-comment': ['warn', { 'ts-ignore': true }],
'@typescript-eslint/prefer-nullish-coalescing': 'off',
'@typescript-eslint/prefer-nullish-coalescing': 'warn',
'@typescript-eslint/no-base-to-string': 'warn',
'@typescript-eslint/no-redundant-type-constituents': 'warn',
'@typescript-eslint/no-unused-vars': 'warn',
'@typescript-eslint/no-unsafe-argument': 'warn',
'@typescript-eslint/prefer-optional-chain': 'warn',
'@typescript-eslint/restrict-plus-operands': 'warn',
},
overrides: [

View file

@ -198,9 +198,12 @@ export class AmqpTrigger implements INodeType {
this.emit([this.helpers.returnJsonArray([data as any])]);
if (!context.receiver?.has_credit()) {
setTimeout(() => {
setTimeout(
() => {
context.receiver?.add_credit(pullMessagesNumber);
}, (options.sleepTime as number) || 10);
},
(options.sleepTime as number) || 10,
);
}
});

View file

@ -572,7 +572,9 @@ export class AwsS3V2 implements INodeType {
const servicePath = bucketName.includes('.') ? 's3' : `${bucketName}.s3`;
const basePath = bucketName.includes('.') ? `/${bucketName}` : '';
const destination = `${basePath}/${destinationParts.slice(2, destinationParts.length).join('/')}`;
const destination = `${basePath}/${destinationParts
.slice(2, destinationParts.length)
.join('/')}`;
responseData = await awsApiRequestREST.call(this, servicePath, 'GET', basePath, '', {
location: '',

View file

@ -619,12 +619,15 @@ export class EmailReadImapV1 implements INodeType {
let reconnectionInterval: NodeJS.Timeout | undefined;
if (options.forceReconnect !== undefined) {
reconnectionInterval = setInterval(async () => {
reconnectionInterval = setInterval(
async () => {
this.logger.verbose('Forcing reconnection of IMAP node.');
connection.end();
connection = await establishConnection();
await connection.openBox(mailbox);
}, (options.forceReconnect as number) * 1000 * 60);
},
(options.forceReconnect as number) * 1000 * 60,
);
}
// When workflow and so node gets set to inactive close the connectoin

View file

@ -628,7 +628,8 @@ export class EmailReadImapV2 implements INodeType {
let reconnectionInterval: NodeJS.Timeout | undefined;
if (options.forceReconnect !== undefined) {
reconnectionInterval = setInterval(async () => {
reconnectionInterval = setInterval(
async () => {
this.logger.verbose('Forcing reconnect to IMAP server');
try {
isCurrentlyReconnecting = true;
@ -641,7 +642,9 @@ export class EmailReadImapV2 implements INodeType {
} finally {
isCurrentlyReconnecting = false;
}
}, (options.forceReconnect as number) * 1000 * 60);
},
(options.forceReconnect as number) * 1000 * 60,
);
}
// When workflow and so node gets set to inactive close the connectoin

View file

@ -76,12 +76,11 @@ export async function getToken(
return response.response.token;
} catch (error) {
let message
let message;
if (error.statusCode === 502) {
message = 'The server is not responding. Is the DataAPI enabled?'
}
else if (error.error ) {
message = error.error.messages[0].code + ' - ' + error.error.messages[0].message
message = 'The server is not responding. Is the DataAPI enabled?';
} else if (error.error) {
message = error.error.messages[0].code + ' - ' + error.error.messages[0].message;
} else {
message = error.message;
}
@ -267,7 +266,7 @@ export async function logout(
};
const response = await this.helpers.request(requestOptions);
return response
return response;
}
export function parseSort(this: IExecuteFunctions, i: number): object | null {

View file

@ -1167,7 +1167,7 @@ return 0;`,
({
json: { ...item.json, __INDEX: index },
pairedItem: { item: index },
} as INodeExecutionData),
}) as INodeExecutionData,
);
//sort items using the compare keys
newItems.sort((a, b) => {

View file

@ -1207,7 +1207,7 @@ return 0;`,
({
json: { ...item.json, __INDEX: index },
pairedItem: { item: index },
} as INodeExecutionData),
}) as INodeExecutionData,
);
//sort items using the compare keys
newItems.sort((a, b) => {

View file

@ -162,7 +162,7 @@ export async function execute(
({
json: { ...item.json, __INDEX: index },
pairedItem: { item: index },
} as INodeExecutionData),
}) as INodeExecutionData,
);
//sort items using the compare keys
newItems.sort((a, b) => {

View file

@ -92,7 +92,7 @@ export const packageOperations: INodeProperties[] = [
return items.flatMap(({ json }) =>
(json.objects as Array<{ package: PackageJson }>).map(
({ package: { name, version, description } }) =>
({ json: { name, version, description } } as INodeExecutionData),
({ json: { name, version, description } }) as INodeExecutionData,
),
);
},

View file

@ -131,7 +131,6 @@ export class Rundeck implements INodeType {
},
default: '',
placeholder: 'Add Filters',
required: false,
description: 'Filter Rundeck nodes by name',
},

View file

@ -56,16 +56,12 @@ export type TEndpointVariableName = 'access_token' | 'dtable_uuid' | 'server';
// Template Literal Types requires-ts-4.1.5 -- deferred
export type TMethod = 'GET' | 'POST';
type TDeferredEndpoint = string;
type TDeferredEndpointExpr = string;
type TEndpoint =
| '/api/v2.1/dtable/app-access-token/'
| '/dtable-server/api/v1/dtables/{{dtable_uuid}}/rows/'
| TDeferredEndpoint;
export type TEndpointExpr = TEndpoint | TDeferredEndpointExpr;
| '/dtable-server/api/v1/dtables/{{dtable_uuid}}/rows/';
export type TEndpointExpr = TEndpoint;
export type TEndpointResolvedExpr =
| TEndpoint
| string; /* deferred: but already in use for header values, e.g. authentication */
TEndpoint; /* deferred: but already in use for header values, e.g. authentication */
export type TDateTimeFormat = 'YYYY-MM-DDTHH:mm:ss.SSSZ' /* moment.js */;

View file

@ -14,7 +14,6 @@ export declare type queryIndexSignature =
| '_id'
| '_between'
| '_parent'
| '_parent'
| '_child'
| '_type'
| '_string'

View file

@ -1,5 +1,8 @@
export class WebhookAuthorizationError extends Error {
constructor(readonly responseCode: number, message?: string) {
constructor(
readonly responseCode: number,
message?: string,
) {
if (message === undefined) {
message = 'Authorization problem!';
if (responseCode === 401) {

View file

@ -87,9 +87,7 @@ export function getAutomaticSecret(credentials: ICredentialDataDecryptedObject)
return createHash('md5').update(data).digest('hex');
}
export function setMetadata(
data: IShoppingLine[] | IShoppingLine[] | IFeeLine[] | ILineItem[] | ICouponLine[],
) {
export function setMetadata(data: IShoppingLine[] | IFeeLine[] | ILineItem[] | ICouponLine[]) {
for (let i = 0; i < data.length; i++) {
//@ts-ignore\
if (data[i].metadataUi?.metadataValues) {
@ -105,7 +103,7 @@ export function setMetadata(
}
export function toSnakeCase(
data: IShoppingLine[] | IShoppingLine[] | IFeeLine[] | ILineItem[] | ICouponLine[] | IDataObject,
data: IShoppingLine[] | IFeeLine[] | ILineItem[] | ICouponLine[] | IDataObject,
) {
if (!Array.isArray(data)) {
data = [data];

View file

@ -9,6 +9,12 @@ module.exports = {
...sharedOptions(__dirname),
rules: {
'import/order': 'off', // TODO: remove this
// TODO: remove these
'import/order': 'off',
'@typescript-eslint/no-base-to-string': 'warn',
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-redundant-type-constituents': 'warn',
'@typescript-eslint/prefer-nullish-coalescing': 'warn',
'@typescript-eslint/prefer-optional-chain': 'warn',
},
};

View file

@ -1199,9 +1199,10 @@ export interface INodePropertyValueExtractorRegex extends INodePropertyValueExtr
}
export interface INodePropertyValueExtractorFunction {
(this: IExecuteSingleFunctions, value: string | NodeParameterValue):
| Promise<string | NodeParameterValue>
| (string | NodeParameterValue);
(
this: IExecuteSingleFunctions,
value: string | NodeParameterValue,
): Promise<string | NodeParameterValue> | (string | NodeParameterValue);
}
export type INodePropertyValueExtractor = INodePropertyValueExtractorRegex;

View file

@ -11,7 +11,6 @@ overrides:
'@types/node': ^18.16.16
chokidar: 3.5.2
jsonwebtoken: 9.0.0
prettier: ^3.0.0
semver: ^7.5.4
tough-cookie: ^4.1.3
tslib: ^2.6.1
@ -4945,7 +4944,7 @@ packages:
less-loader: 11.1.3(less@4.1.3)(webpack@5.75.0)
postcss: 8.4.27
postcss-loader: 7.3.3(postcss@8.4.27)(webpack@5.75.0)
prettier: 3.0.0
prettier: 2.8.8
react: 17.0.2
react-dom: 18.2.0(react@17.0.2)
resolve-url-loader: 5.0.0
@ -5259,7 +5258,7 @@ packages:
jscodeshift: 0.14.0(@babel/preset-env@7.22.9)
leven: 3.1.0
ora: 5.4.1
prettier: 3.0.0
prettier: 2.8.8
prompts: 2.4.2
puppeteer-core: 2.1.1
read-pkg-up: 7.0.1
@ -5310,7 +5309,7 @@ packages:
globby: 11.1.0
jscodeshift: 0.14.0(@babel/preset-env@7.22.9)
lodash: 4.17.21
prettier: 3.0.0
prettier: 2.8.8
recast: 0.23.3
transitivePeerDependencies:
- supports-color
@ -10886,7 +10885,7 @@ packages:
indefinite: 2.4.1
pascal-case: 3.1.2
pluralize: 8.0.0
prettier: 3.0.0
prettier: 2.8.8
sentence-case: 3.0.4
title-case: 3.0.3
transitivePeerDependencies:
@ -17114,6 +17113,12 @@ packages:
fast-diff: 1.2.0
dev: true
/prettier@2.8.8:
resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==}
engines: {node: '>=10.13.0'}
hasBin: true
dev: true
/prettier@3.0.0:
resolution: {integrity: sha512-zBf5eHpwHOGPC47h0zrPyNn+eAEIdEzfywMoYn2XPi0P44Zp0tSq64rq0xAREh4auw2cJZHo9QUob+NqCQky4g==}
engines: {node: '>=14'}