Skip to content

Commit

Permalink
Merge pull request #30 from skriptfabrik/moco
Browse files Browse the repository at this point in the history
Add MOCO credentials and nodes
  • Loading branch information
schroedan authored Mar 20, 2024
2 parents 4493ea6 + 51297d9 commit a29fc1c
Show file tree
Hide file tree
Showing 28 changed files with 6,454 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,10 @@ updates:
- dependency-name: '@types/*'
schedule:
interval: 'weekly'

- package-ecosystem: 'npm'
directory: '/nodes/moco'
ignore:
- dependency-name: '@types/*'
schedule:
interval: 'weekly'
1 change: 1 addition & 0 deletions .github/workflows/publish-package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
tags:
- 'clockify-enhanced-*'
- 'google-enhanced-*'
- 'moco-*'

env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ This is a mono repository with many different community nodes.
Please take a closer look at the detailed instructions for the individual nodes:

- [Enhanced Clockify community nodes](nodes/clockify-enhanced/README.md)
- [MOCO community nodes](nodes/moco/README.md)

## Resources

Expand Down
30 changes: 30 additions & 0 deletions nodes/moco/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"extends": ["../../.eslintrc.base.json"],
"ignorePatterns": ["!**/*"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {}
},
{
"files": ["*.ts", "*.tsx"],
"rules": {}
},
{
"files": ["*.js", "*.jsx"],
"rules": {}
},
{
"files": ["*.json"],
"parser": "jsonc-eslint-parser",
"rules": {
"@nx/dependency-checks": [
"error",
{
"ignoredDependencies": ["express", "jest-mock-extended"]
}
]
}
}
]
}
65 changes: 65 additions & 0 deletions nodes/moco/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# @skriptfabrik/n8n-nodes-moco

[![NPM Version](https://img.shields.io/npm/v/@skriptfabrik/n8n-nodes-moco)](https://www.npmjs.com/package/@skriptfabrik/n8n-nodes-moco)
[![NPM Downloads](https://img.shields.io/npm/dt/@skriptfabrik/n8n-nodes-moco)](https://www.npmjs.com/package/@skriptfabrik/n8n-nodes-moco)

> MOCO community nodes for your [n8n](https://n8n.io/) workflows
This is an n8n community node. It lets you use [MOCO](https://www.mocoapp.com/) in your n8n workflows.

MOCO is an ERP agency software with the following features:

- Time recording
- Billing
- Customer acquisition
- Capacity planning
- Personnel & contacts
- Expenses

[n8n](https://n8n.io/) is a [fair-code licensed](https://docs.n8n.io/reference/license/) workflow automation platform.

[Installation](#installation)
[Operations](#operations)
[Credentials](#credentials)
[Compatibility](#compatibility)
[Resources](#resources)

## Installation

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

1. Go to **Settings > Community Nodes**.
2. Select **Install**.
3. Enter `@skriptfabrik/n8n-nodes-moco` in **Enter npm package name**.
4. Agree to the [risks](https://docs.n8n.io/integrations/community-nodes/risks/) of using community nodes: select
**I understand the risks of installing unverified code from a public source**.
5. Select **Install**.

After installing the node, you can use it like any other node. n8n displays the node in search results in the **Nodes** panel.

## Operations

It supports these operations:

- Create, delete, get, list and update activities
- Create, delete, get, list and update project
- Create, delete, get, list and update users

## Credentials

Create a free MOCO account [here](https://www.mocoapp.com/anmeldung/start) which allows you to test it for 30 days
without obligation.

- Remember the Sub-Domain
- Generate an API Key here: Settings -> Extensions -> API & WebHooks -> API Keys
- Find the Web Hook Secret here: Settings -> Extensions -> API & WebHooks -> WebHooks

## Compatibility

Tested against n8n version 1.0+.

## Resources

- [n8n community nodes documentation](https://docs.n8n.io/integrations/community-nodes/)
- [MOCO API Documentation](https://hundertzehn.github.io/mocoapp-api-docs/)
11 changes: 11 additions & 0 deletions nodes/moco/jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/* eslint-disable */
export default {
displayName: 'n8n-nodes-moco',
preset: '../../jest.preset.js',
testEnvironment: 'node',
transform: {
'^.+\\.[tj]s$': ['ts-jest', { tsconfig: '<rootDir>/tsconfig.spec.json' }],
},
moduleFileExtensions: ['ts', 'js', 'html'],
coverageDirectory: '../../coverage/nodes/moco',
};
44 changes: 44 additions & 0 deletions nodes/moco/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"name": "@skriptfabrik/n8n-nodes-moco",
"version": "0.1.0",
"description": "MOCO community nodes for n8n",
"keywords": [
"moco",
"n8n",
"n8n-community-node",
"n8n-community-node-package"
],
"license": "MIT",
"homepage": "https://github.com/skriptfabrik/n8n-nodes/blob/main/nodes/moco/README.md",
"author": {
"name": "skriptfabrik",
"email": "[email protected]"
},
"repository": {
"type": "git",
"url": "git+https://github.com/skriptfabrik/n8n-nodes.git"
},
"main": "./src/index.js",
"typings": "./src/index.d.ts",
"type": "commonjs",
"n8n": {
"n8nNodesApiVersion": 1,
"credentials": [
"src/credentials/MocoApi.credentials.js"
],
"nodes": [
"src/nodes/Moco/Moco.node.js",
"src/nodes/Moco/MocoTrigger.node.js"
]
},
"dependencies": {
"moment-timezone": "^0.5.28",
"tslib": "^2.6.2"
},
"peerDependencies": {
"n8n-workflow": "^1.29.1"
},
"publishConfig": {
"registry": "https://registry.npmjs.org"
}
}
43 changes: 43 additions & 0 deletions nodes/moco/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"name": "n8n-nodes-moco",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "nodes/moco/src",
"projectType": "library",
"targets": {
"build": {
"executor": "@nx/js:tsc",
"outputs": ["{options.outputPath}"],
"options": {
"outputPath": "dist/nodes/moco",
"tsConfig": "nodes/moco/tsconfig.lib.json",
"packageJson": "nodes/moco/package.json",
"main": "nodes/moco/src/index.ts",
"assets": [
"nodes/moco/src/nodes/*/*.svg",
"nodes/moco/src/nodes/*/*.json",
"nodes/moco/*.md"
]
}
},
"link": {
"executor": "nx:run-commands",
"options": {
"cwd": "dist/nodes/moco",
"command": "npm link --no-audit"
},
"dependsOn": ["build"]
},
"install": {
"executor": "nx:run-commands",
"options": {
"command": "node tools/scripts/install.mjs n8n-nodes-moco"
},
"dependsOn": ["link"]
},
"publish": {
"command": "node tools/scripts/publish.mjs n8n-nodes-moco {args.ver} {args.tag}",
"dependsOn": ["build"]
}
},
"tags": []
}
Loading

0 comments on commit a29fc1c

Please sign in to comment.