Skip to content

Commit

Permalink
Merge branch 'master' into remove-from-ui-deleted-event-name
Browse files Browse the repository at this point in the history
  • Loading branch information
ivov committed Aug 14, 2024
2 parents 7d5b976 + bae0116 commit aee8fae
Show file tree
Hide file tree
Showing 44 changed files with 1,123 additions and 887 deletions.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Config, Env, Nested } from '../decorators';

@Config
export class SmtpAuth {
class SmtpAuth {
/** SMTP login username */
@Env('N8N_SMTP_USER')
user = '';
Expand All @@ -20,7 +20,7 @@ export class SmtpAuth {
}

@Config
export class SmtpConfig {
class SmtpConfig {
/** SMTP server host */
@Env('N8N_SMTP_HOST')
host = '';
Expand Down Expand Up @@ -65,7 +65,7 @@ export class TemplateConfig {
}

@Config
export class EmailConfig {
class EmailConfig {
/** How to send emails */
@Env('N8N_EMAIL_MODE')
mode: '' | 'smtp' = 'smtp';
Expand All @@ -76,3 +76,9 @@ export class EmailConfig {
@Nested
template: TemplateConfig;
}

@Config
export class UserManagementConfig {
@Nested
emails: EmailConfig;
}
68 changes: 31 additions & 37 deletions packages/@n8n/config/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,85 +1,79 @@
import { Config, Env, Nested } from './decorators';
import { CredentialsConfig } from './configs/credentials';
import { DatabaseConfig } from './configs/database';
import { EmailConfig } from './configs/email';
import { VersionNotificationsConfig } from './configs/version-notifications';
import { PublicApiConfig } from './configs/public-api';
import { ExternalSecretsConfig } from './configs/external-secrets';
import { TemplatesConfig } from './configs/templates';
import { EventBusConfig } from './configs/event-bus';
import { NodesConfig } from './configs/nodes';
import { ExternalStorageConfig } from './configs/external-storage';
import { WorkflowsConfig } from './configs/workflows';
import { EndpointsConfig } from './configs/endpoints';
import { CacheConfig } from './configs/cache';
import { CredentialsConfig } from './configs/credentials.config';
import { DatabaseConfig } from './configs/database.config';
import { VersionNotificationsConfig } from './configs/version-notifications.config';
import { PublicApiConfig } from './configs/public-api.config';
import { ExternalSecretsConfig } from './configs/external-secrets.config';
import { TemplatesConfig } from './configs/templates.config';
import { EventBusConfig } from './configs/event-bus.config';
import { NodesConfig } from './configs/nodes.config';
import { ExternalStorageConfig } from './configs/external-storage.config';
import { WorkflowsConfig } from './configs/workflows.config';
import { EndpointsConfig } from './configs/endpoints.config';
import { CacheConfig } from './configs/cache.config';
import { ScalingModeConfig } from './configs/scaling-mode.config';

@Config
class UserManagementConfig {
@Nested
emails: EmailConfig;
}
import { UserManagementConfig } from './configs/user-management.config';

@Config
export class GlobalConfig {
@Nested
readonly database: DatabaseConfig;
database: DatabaseConfig;

@Nested
readonly credentials: CredentialsConfig;
credentials: CredentialsConfig;

@Nested
readonly userManagement: UserManagementConfig;
userManagement: UserManagementConfig;

@Nested
readonly versionNotifications: VersionNotificationsConfig;
versionNotifications: VersionNotificationsConfig;

@Nested
readonly publicApi: PublicApiConfig;
publicApi: PublicApiConfig;

@Nested
readonly externalSecrets: ExternalSecretsConfig;
externalSecrets: ExternalSecretsConfig;

@Nested
readonly templates: TemplatesConfig;
templates: TemplatesConfig;

@Nested
readonly eventBus: EventBusConfig;
eventBus: EventBusConfig;

@Nested
readonly nodes: NodesConfig;
nodes: NodesConfig;

@Nested
readonly externalStorage: ExternalStorageConfig;
externalStorage: ExternalStorageConfig;

@Nested
readonly workflows: WorkflowsConfig;
workflows: WorkflowsConfig;

/** Path n8n is deployed to */
@Env('N8N_PATH')
readonly path: string = '/';
path = '/';

/** Host name n8n can be reached */
@Env('N8N_HOST')
readonly host: string = 'localhost';
host = 'localhost';

/** HTTP port n8n can be reached */
@Env('N8N_PORT')
readonly port: number = 5678;
port = 5678;

/** IP address n8n should listen on */
@Env('N8N_LISTEN_ADDRESS')
readonly listen_address: string = '0.0.0.0';
listen_address = '0.0.0.0';

/** HTTP Protocol via which n8n can be reached */
@Env('N8N_PROTOCOL')
readonly protocol: 'http' | 'https' = 'http';
protocol: 'http' | 'https' = 'http';

@Nested
readonly endpoints: EndpointsConfig;
endpoints: EndpointsConfig;

@Nested
readonly cache: CacheConfig;
cache: CacheConfig;

@Nested
queue: ScalingModeConfig;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,7 @@ export class ManualChatTrigger implements INodeType {
name: 'openChat',
type: 'button',
typeOptions: {
buttonConfig: {
action: 'openChat',
},
action: 'openChat',
},
default: '',
},
Expand Down
26 changes: 1 addition & 25 deletions packages/cli/src/controllers/dynamicNodeParameters.controller.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { INodePropertyOptions, NodeParameterValueType } from 'n8n-workflow';
import type { INodePropertyOptions } from 'n8n-workflow';

import { Post, RestController } from '@/decorators';
import { getBase } from '@/WorkflowExecuteAdditionalData';
Expand Down Expand Up @@ -92,28 +92,4 @@ export class DynamicNodeParametersController {
credentials,
);
}

@Post('/action-result')
async getActionResult(
req: DynamicNodeParametersRequest.ActionResult,
): Promise<NodeParameterValueType> {
const { currentNodeParameters, nodeTypeAndVersion, path, credentials, handler, payload } =
req.body;

const additionalData = await getBase(req.user.id, currentNodeParameters);

if (handler) {
return await this.service.getActionResult(
handler,
path,
additionalData,
nodeTypeAndVersion,
currentNodeParameters,
payload,
credentials,
);
}

return;
}
}
Loading

0 comments on commit aee8fae

Please sign in to comment.