Skip to content

Commit

Permalink
Merge branch 'master' into ado-2234-transparent-top-menu-in-cloud
Browse files Browse the repository at this point in the history
* master:
  feat: Initial Dev Containers setup (no-changelog) (#8951)
  feat: Add support for dark mode node icons and colors (#9412)
  fix(Gotify Node): Fix issue with self signed certificates not working (#9647)
  refactor(core): Support writing tests in `cli/src` (no-changelog) (#9646)
  fix(n8n Form Trigger Node): Error if Respond to Webhook and respond node not in workflow (#9641)
  • Loading branch information
MiloradFilipovic committed Jun 6, 2024
2 parents 22bae0f + f7198e3 commit 59732b8
Show file tree
Hide file tree
Showing 305 changed files with 1,531 additions and 523 deletions.
7 changes: 7 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM n8nio/base:20

RUN apk add --no-cache --update openssh sudo shadow bash
RUN echo node ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/node && chmod 0440 /etc/sudoers.d/node
RUN mkdir /workspaces && chown node:node /workspaces
USER node
RUN mkdir -p ~/.pnpm-store && pnpm config set store-dir ~/.pnpm-store --global
19 changes: 19 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "n8n",
"dockerComposeFile": "docker-compose.yml",
"service": "n8n",
"workspaceFolder": "/workspaces",
"mounts": [
"type=bind,source=${localWorkspaceFolder},target=/workspaces,consistency=cached",
"type=bind,source=${localEnv:HOME}/.ssh,target=/home/node/.ssh,consistency=cached",
"type=bind,source=${localEnv:HOME}/.n8n,target=/home/node/.n8n,consistency=cached"
],
"forwardPorts": [8080, 5678],
"postCreateCommand": "corepack prepare --activate && pnpm install ",
"postAttachCommand": "pnpm build",
"customizations": {
"codespaces": {
"openFiles": ["CONTRIBUTING.md"]
}
}
}
23 changes: 23 additions & 0 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
volumes:
postgres-data:

services:
postgres:
image: postgres:16-alpine
restart: unless-stopped
volumes:
- postgres-data:/var/lib/postgresql/data
environment:
- POSTGRES_DB=n8n
- POSTGRES_PASSWORD=password

n8n:
build:
context: .
dockerfile: Dockerfile
volumes:
- ..:/workspaces:cached
command: sleep infinity
environment:
DB_TYPE: postgresdb
DB_POSTGRESDB_PASSWORD: password
3 changes: 3 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ hoist = true
shamefully-hoist = true
hoist-workspace-packages = false
loglevel = warn
package-manager-strict=false
# https://github.com/pnpm/pnpm/issues/7024
package-import-method=clone-or-copy
5 changes: 5 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Great that you are here and you want to contribute to n8n
- [Code of conduct](#code-of-conduct)
- [Directory structure](#directory-structure)
- [Development setup](#development-setup)
- [Dev Container](#dev-container)
- [Requirements](#requirements)
- [Node.js](#nodejs)
- [pnpm](#pnpm)
Expand Down Expand Up @@ -60,6 +61,10 @@ The most important directories:
If you want to change or extend n8n you have to make sure that all the needed
dependencies are installed and the packages get linked correctly. Here's a short guide on how that can be done:

### Dev Container

If you already have VS Code and Docker installed, you can click [here](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/n8n-io/n8n) to get started. Clicking these links will cause VS Code to automatically install the Dev Containers extension if needed, clone the source code into a container volume, and spin up a dev container for use.

### Requirements

#### Node.js
Expand Down
6 changes: 4 additions & 2 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@ const config = {
// This resolve the path mappings from the tsconfig relative to each jest.config.js
moduleNameMapper: Object.entries(paths || {}).reduce((acc, [path, [mapping]]) => {
path = `^${path.replace(/\/\*$/, '/(.*)$')}`;
mapping = mapping.replace(/^\.\/(?:(.*)\/)?\*$/, '$1');
mapping = mapping.replace(/^\.?\.\/(?:(.*)\/)?\*$/, '$1');
mapping = mapping ? `/${mapping}` : '';
acc[path] = '<rootDir>' + (baseUrl ? `/${baseUrl.replace(/^\.\//, '')}` : '') + mapping + '/$1';
acc[path] = mapping.startsWith('/test')
? '<rootDir>' + mapping + '/$1'
: '<rootDir>' + (baseUrl ? `/${baseUrl.replace(/^\.\//, '')}` : '') + mapping + '/$1';
return acc;
}, {}),
setupFilesAfterEnv: ['jest-expect-message'],
Expand Down
7 changes: 7 additions & 0 deletions n8n.code-workspace
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"folders": [
{
"path": ".",
},
],
}
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ export class Agent implements INodeType {
displayName: 'AI Agent',
name: 'agent',
icon: 'fa:robot',
iconColor: 'black',
group: ['transform'],
version: [1, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6],
description: 'Generates an action plan and executes it. Can use external tools.',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export class EmbeddingsOpenAi implements INodeType {
description: INodeTypeDescription = {
displayName: 'Embeddings OpenAI',
name: 'embeddingsOpenAi',
icon: 'file:openAi.svg',
icon: { light: 'file:openAiLight.svg', dark: 'file:openAiLight.dark.svg' },
credentials: [
{
name: 'openAiApi',
Expand Down

This file was deleted.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export class LmChatOpenAi implements INodeType {
displayName: 'OpenAI Chat Model',
// eslint-disable-next-line n8n-nodes-base/node-class-description-name-miscased
name: 'lmChatOpenAi',
icon: 'file:openAi.svg',
icon: { light: 'file:openAiLight.svg', dark: 'file:openAiLight.dark.svg' },
group: ['transform'],
version: 1,
description: 'For advanced usage with an AI chain',
Expand Down

This file was deleted.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export class LmOpenAi implements INodeType {
displayName: 'OpenAI Model',
// eslint-disable-next-line n8n-nodes-base/node-class-description-name-miscased
name: 'lmOpenAi',
icon: 'file:openAi.svg',
icon: { light: 'file:openAiLight.svg', dark: 'file:openAiLight.dark.svg' },
group: ['transform'],
version: 1,
description: 'For advanced usage with an AI chain',
Expand Down
Loading

0 comments on commit 59732b8

Please sign in to comment.