Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
schroedan committed Feb 27, 2024
0 parents commit 2a8c68b
Show file tree
Hide file tree
Showing 25 changed files with 28,254 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"name": "n8n-nodes",
"image": "mcr.microsoft.com/vscode/devcontainers/base:ubuntu-22.04",
"features": {
"ghcr.io/devcontainers/features/node:1": {
"version": "18.19.0",
"nodeGypDependencies": true
},
"ghcr.io/devcontainers-contrib/features/markdownlint-cli:1": {
"version": "latest"
},
"ghcr.io/devcontainers-contrib/features/yamllint:2": {
"version": "latest"
}
},
"customizations": {
"vscode": {
"extensions": [
"christian-kohler.npm-intellisense",
"dbaeumer.vscode-eslint",
"EditorConfig.EditorConfig",
"esbenp.prettier-vscode",
"firsttris.vscode-jest-runner",
"fnando.linter",
"GitHub.copilot",
"github.vscode-github-actions",
"GitHub.vscode-pull-request-github",
"nrwl.angular-console",
"ritwickdey.liveserver"
]
}
},
"appPort": "5678:5678",
"remoteEnv": {
"GENERIC_TIMEZONE": "Europe/Berlin",
"N8N_CREDENTIALS": "credentials.json",
"N8N_DIAGNOSTICS_ENABLED": "false",
"N8N_ENCRYPTION_KEY": "aofXFdCRR!rdMF7grM5zLiB&@d5S8Ddr",
"N8N_HIRING_BANNER_ENABLED": "false",
"N8N_PERSONALIZATION_ENABLED": "false",
"N8N_TEMPLATES_ENABLED": "false",
"N8N_USER_FOLDER": "${containerWorkspaceFolder}",
"N8N_VERSION_NOTIFICATIONS_ENABLED": "false",
"TZ": "Europe/Berlin"
},
"postCreateCommand": ".devcontainer/hooks/post-create.sh"
}
6 changes: 6 additions & 0 deletions .devcontainer/hooks/post-create.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh

set -e

# Install dependencies
npm i --no-audit --no-fund --no-update-notifier
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Editor configuration, see http://editorconfig.org
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
max_line_length = off
trim_trailing_whitespace = false
43 changes: 43 additions & 0 deletions .eslintrc.base.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"root": true,
"ignorePatterns": ["**/*"],
"plugins": ["@nx", "eslint-plugin-n8n-nodes-base"],
"extends": ["plugin:n8n-nodes-base/nodes"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {
"@nx/enforce-module-boundaries": [
"error",
{
"enforceBuildableLibDependency": true,
"allow": [],
"depConstraints": [
{
"sourceTag": "*",
"onlyDependOnLibsWithTags": ["*"]
}
]
}
]
}
},
{
"files": ["*.ts", "*.tsx"],
"extends": ["plugin:@nx/typescript"],
"rules": {}
},
{
"files": ["*.js", "*.jsx"],
"extends": ["plugin:@nx/javascript"],
"rules": {}
},
{
"files": ["*.spec.ts", "*.spec.tsx", "*.spec.js", "*.spec.jsx"],
"env": {
"jest": true
},
"rules": {}
}
]
}
14 changes: 14 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: 2

updates:
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: 'weekly'

- package-ecosystem: 'npm'
directory: '/'
ignore:
- dependency-name: '@types/*'
schedule:
interval: 'weekly'
75 changes: 75 additions & 0 deletions .github/workflows/pull-request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: Pull Request

on:
pull_request:
types:
- opened
- edited
- reopened
- synchronize

env:
NODE_VERSION: 18.18.2

jobs:
check-lint-test-build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v4
with:
cache: npm
node-version: ${{ env.NODE_VERSION }}

- name: Restore Node.js modules cache
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.os }}-Node-Modules-V1-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-Node-Modules-V1-

- name: Install dependencies
run: npm ci

- name: Derive appropriate SHAs for base and head for `nx affected` commands
uses: nrwl/nx-set-shas@v4

- name: Check format
run: npx nx format:check

- name: Lint source code affected by changes
run: npx nx affected --target=lint --parallel=3

- name: Test source code affected by changes
run: npx nx affected --target=test --configuration=ci --parallel=3

- name: Run build of packages affected by changes
run: npx nx affected --target=build --parallel=3

lint-markdown:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Check Markdown files
uses: nosborn/github-action-markdown-cli@v3
with:
files: .

lint-yaml:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Check YAML files
uses: ibiqlik/action-yamllint@v3
25 changes: 25 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Build files
/dist

# Caches and logs
/.cache
/.nx/cache

# Coverage
/coverage

# Dependencies
/node_modules

# IDEs and editors
/.idea

# N8N
/.n8n

# System files
.DS_Store
Thumbs.db

# Temp files
/tmp
4 changes: 4 additions & 0 deletions .markdownlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
default: true

MD013:
line_length: 120
2 changes: 2 additions & 0 deletions .markdownlintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/dist
/node_modules
8 changes: 8 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Add files here to ignore them from prettier formatting
/.cache
/.n8n
/.nx/cache
/.verdaccio
/coverage
/dist
/node_modules
3 changes: 3 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"singleQuote": true
}
29 changes: 29 additions & 0 deletions .verdaccio/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# path to a directory with all packages
storage: ../tmp/local-registry/storage

# a list of other known repositories we can talk to
uplinks:
npmjs:
url: https://registry.npmjs.org/
maxage: 60m

packages:
'**':
# give all users (including non-authenticated users) full access
# because it is a local registry
access: $all
publish: $all
unpublish: $all

# if package is not available locally, proxy requests to npm registry
proxy: npmjs

# log settings
logs:
type: stdout
format: pretty
level: warn

publish:
# set allow_offline to true to allow publish offline
allow_offline: true
17 changes: 17 additions & 0 deletions .yamllint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
extends: default

ignore: |
/dist
/node_modules
rules:
document-start: false
line-length:
max: 120
new-lines:
type: unix
new-line-at-end-of-file:
level: warning
trailing-spaces:
level: warning
truthy: false
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# @skriptfabrik/n8n-nodes

> Community nodes for your [n8n](https://n8n.io/) workflows
## Installation

Follow the [installation guide](https://docs.n8n.io/integrations/community-nodes/installation/) in the n8n community
nodes documentation.

## Resources

- [n8n community nodes documentation](https://docs.n8n.io/integrations/community-nodes/)
5 changes: 5 additions & 0 deletions jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { getJestProjects } from '@nx/jest';

export default {
projects: getJestProjects(),
};
13 changes: 13 additions & 0 deletions jest.preset.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
const nxPreset = require('@nx/jest/preset').default;

module.exports = {
...nxPreset,
coverageThreshold: {
global: {
branches: 100,
functions: 100,
lines: 100,
statements: 100,
},
},
};
Empty file added nodes/.gitkeep
Empty file.
28 changes: 28 additions & 0 deletions nx.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"$schema": "./node_modules/nx/schemas/nx-schema.json",
"plugins": [
{
"plugin": "@nx/eslint/plugin",
"options": {
"targetName": "lint"
}
},
{
"plugin": "@nx/jest/plugin",
"options": {
"targetName": "test"
}
}
],
"targetDefaults": {
"@nx/js:tsc": {
"cache": true,
"dependsOn": ["^build"],
"inputs": ["default", "^default"]
}
},
"workspaceLayout": {
"appsDir": "nodes",
"libsDir": "nodes"
}
}
Loading

0 comments on commit 2a8c68b

Please sign in to comment.