Skip to content

Commit 7bf68ae

Browse files
committed
First Release
1 parent 49ea4c9 commit 7bf68ae

File tree

10 files changed

+93
-26
lines changed

10 files changed

+93
-26
lines changed

.eslintrc.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,6 @@ module.exports = {
3535
'n8n-nodes-base/community-package-json-name-still-default': 'off',
3636
},
3737
},
38-
{
39-
files: ['./credentials/**/*.ts'],
40-
plugins: ['eslint-plugin-n8n-nodes-base'],
41-
extends: ['plugin:n8n-nodes-base/credentials'],
42-
rules: {
43-
'n8n-nodes-base/cred-class-field-documentation-url-missing': 'off',
44-
'n8n-nodes-base/cred-class-field-documentation-url-miscased': 'off',
45-
},
46-
},
4738
{
4839
files: ['./nodes/**/*.ts'],
4940
plugins: ['eslint-plugin-n8n-nodes-base'],

.github/workflows/push.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Run tests and upload coverage
2+
3+
on:
4+
push
5+
6+
jobs:
7+
test:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v4
12+
13+
- uses: pnpm/action-setup@v4
14+
name: Install pnpm
15+
with:
16+
run_install: false
17+
18+
- name: Install Node.js
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: 20
22+
cache: 'pnpm'
23+
24+
- name: Install dependencies
25+
run: pnpm install
26+
27+
- name: Run tests and collect coverage
28+
run: pnpm coverage
29+
30+
- name: Upload results to Codecov
31+
uses: codecov/codecov-action@v5
32+
with:
33+
token: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/release.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Release CI
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
permissions:
8+
contents: write
9+
id-token: write
10+
11+
jobs:
12+
publish:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
- uses: pnpm/action-setup@v4
18+
name: Install pnpm
19+
with:
20+
run_install: false
21+
- name: Install Node.js
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: '20.x'
25+
registry-url: 'https://registry.npmjs.org'
26+
cache: 'pnpm'
27+
- name: Install dependencies
28+
run: pnpm install
29+
- name: Run tests and build
30+
run: pnpm run ci
31+
- name: Publish in NPM
32+
run: npm publish --provenance --access public
33+
env:
34+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
[![codecov](https://codecov.io/gh/pedrozadotdev/n8n-nodes-gnr-stack/branch/main/graph/badge.svg)](https://codecov.io/gh/pedrozadotdev/n8n-nodes-gnr-stack)
2+
![](https://github.com/pedrozadotdev/n8n-nodes-gnr-stack/workflows/Release%20CI/badge.svg)
3+
[![Version][npm-version]][npm-link] [![NPM Downloads][npm-downloads]][npm-link] [![License][npm-license]](https://github.com/pedrozadotdev/n8n-nodes-gnr-stack/blob/main/LICENSE)
4+
5+
[npm-version]: https://img.shields.io/npm/v/n8n-nodes-gnr-stack.svg
6+
[npm-downloads]: https://img.shields.io/npm/dt/n8n-nodes-gnr-stack.svg
7+
[npm-license]: https://img.shields.io/npm/l/n8n-nodes-gnr-stack.svg
8+
[npm-link]: https://www.npmjs.com/package/n8n-nodes-gnr-stack
9+
110
# n8n-nodes-gnr-stack
211

312
This is a set of n8n community nodes. It may be used in GNR(Grist/N8n/Redis) Stack.
@@ -47,5 +56,6 @@ N8N 1.76.1 and above.
4756
## Resources
4857

4958
* [n8n community nodes documentation](https://docs.n8n.io/integrations/community-nodes/)
59+
* [A Better Way to Store Passwords](https://auth0.com/blog/adding-salt-to-hashing-a-better-way-to-store-passwords/)
5060
* [Caddy Forward Auth](https://caddyserver.com/docs/caddyfile/directives/forward_auth)
5161
* [RedisVectorStore](https://js.langchain.com/docs/integrations/vectorstores/redis/)

examples/Caddyfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
:8080 {
22

3-
handle_path /n8n/webhook/* {
3+
handle /n8n/webhook/* {
44
uri strip_prefix /n8n
55
reverse_proxy n8n:5678 {
66
header_up X-Real-IP {remote_host}

jest.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
/** @type {import('jest').Config} */
22
module.exports = {
33
preset: 'ts-jest/presets/default-esm',
4-
collectCoverage: true,
4+
collectCoverage: false,
55
coverageDirectory: 'coverage',
66
coverageProvider: 'v8',
77
collectCoverageFrom: ['nodes/**/*.ts'],
88
coveragePathIgnorePatterns: [
99
'<rootDir>/nodes/common/types.ts',
1010
'<rootDir>/nodes/VectorStoreRedis/VectorStoreRedis.node.ts',
1111
],
12-
testPathIgnorePatterns: ['/node_modules/'],
12+
testPathIgnorePatterns: ['/node_modules/', '/dist/'],
1313
transform: {},
1414
moduleNameMapper: {
1515
'^(\\.{1,2}/.*)\\.js$': '$1',

package.json

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "n8n-nodes-http-gnr-stack",
2+
"name": "n8n-nodes-gnr-stack",
33
"version": "0.1.0",
44
"description": "This is a set of n8n community nodes. It may be used in GNR Stack.",
55
"keywords": [
@@ -26,12 +26,13 @@
2626
"build": "tsc && gulp build:icons",
2727
"build-docker": "pnpm i && pnpm build && chown -R node:node ./dist",
2828
"dev": "tsc --watch",
29-
"format": "prettier nodes credentials --write",
30-
"lint": "eslint nodes credentials package.json",
31-
"lintfix": "eslint nodes credentials package.json --fix",
32-
"prepublishOnly": "pnpm build && pnpm lint -c .eslintrc.prepublish.js nodes credentials package.json",
33-
"test": "jest --silent=false",
34-
"test-watch": "jest --watch"
29+
"format": "prettier nodes --write",
30+
"lint": "eslint nodes package.json",
31+
"lintfix": "eslint nodes package.json --fix",
32+
"prepublishOnly": "pnpm build && pnpm lint -c .eslintrc.prepublish.js nodes package.json",
33+
"test": "jest",
34+
"coverage": "jest --collectCoverage=true",
35+
"ci": "pnpm test && pnpm build"
3536
},
3637
"files": [
3738
"dist"

test/nodes/response.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ describe('Response Suite', () => {
6262
body: undefined,
6363
headers: {
6464
'Set-Cookie': expect.stringMatching(
65-
/n8n_hfa_session=[A-Za-z0-9]{32}; HttpOnly; SameSite=Lax; Expires=Mon, \d{1,2} \w{3} \d{4} \d{2}:\d{2}:\d{2} GMT; Path=\/; Secure/g,
65+
/n8n_hfa_session=[A-Za-z0-9]{32}; HttpOnly; SameSite=Lax; Expires=\w{3}, \d{2} \w{3} \d{4} \d{2}:\d{2}:\d{2} GMT; Path=\/; Secure/g,
6666
),
6767
location: 'http://localhost:8080/protected',
6868
},

test/nodes/trigger.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ describe('Trigger Suite', () => {
8484
webhookName: 'logout',
8585
request: {
8686
headers: {
87-
Origin: 'http://localhost:8080',
87+
origin: 'http://localhost:8080',
8888
},
8989
},
9090
});
@@ -205,7 +205,7 @@ describe('Trigger Suite', () => {
205205
webhookName: 'default',
206206
request: {
207207
headers: {
208-
Origin: 'http://localhost:8080',
208+
origin: 'http://localhost:8080',
209209
},
210210
body,
211211
},
@@ -225,7 +225,7 @@ describe('Trigger Suite', () => {
225225
webhookName: 'default',
226226
request: {
227227
headers: {
228-
Origin: 'http://localhost:8080',
228+
origin: 'http://localhost:8080',
229229
[REMOTE_IP_HEADER]: 'REMOTE_IP',
230230
},
231231
body,
@@ -253,7 +253,7 @@ describe('Trigger Suite', () => {
253253
webhookName: 'default',
254254
request: {
255255
headers: {
256-
Origin: 'http://localhost:8080',
256+
origin: 'http://localhost:8080',
257257
[REMOTE_IP_HEADER]: 'REMOTE_IP',
258258
},
259259
body,

tsconfig.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@
2121
"outDir": "./dist/",
2222
},
2323
"include": [
24-
"credentials/**/*",
2524
"nodes/**/*",
26-
"test/**/*",
2725
"nodes/**/*.json",
2826
"package.json",
2927
],

0 commit comments

Comments
 (0)