n8n-nodes-nocrash 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +122 -0
- package/dist/credentials/NocrashApi.credentials.d.ts +10 -0
- package/dist/credentials/NocrashApi.credentials.js +40 -0
- package/dist/credentials/NocrashApi.credentials.js.map +1 -0
- package/dist/credentials/NocrashN8nApi.credentials.d.ts +10 -0
- package/dist/credentials/NocrashN8nApi.credentials.js +49 -0
- package/dist/credentials/NocrashN8nApi.credentials.js.map +1 -0
- package/dist/credentials/icons/nocrash.dark.svg +5 -0
- package/dist/credentials/icons/nocrash.svg +5 -0
- package/dist/nodes/Nocrash/Nocrash.node.d.ts +5 -0
- package/dist/nodes/Nocrash/Nocrash.node.js +224 -0
- package/dist/nodes/Nocrash/Nocrash.node.js.map +1 -0
- package/dist/nodes/Nocrash/Nocrash.node.json +18 -0
- package/dist/nodes/Nocrash/descriptions/AuditDescription.d.ts +2 -0
- package/dist/nodes/Nocrash/descriptions/AuditDescription.js +39 -0
- package/dist/nodes/Nocrash/descriptions/AuditDescription.js.map +1 -0
- package/dist/nodes/Nocrash/descriptions/HeartbeatDescription.d.ts +2 -0
- package/dist/nodes/Nocrash/descriptions/HeartbeatDescription.js +47 -0
- package/dist/nodes/Nocrash/descriptions/HeartbeatDescription.js.map +1 -0
- package/dist/nodes/Nocrash/descriptions/ReportFailureDescription.d.ts +2 -0
- package/dist/nodes/Nocrash/descriptions/ReportFailureDescription.js +48 -0
- package/dist/nodes/Nocrash/descriptions/ReportFailureDescription.js.map +1 -0
- package/dist/nodes/Nocrash/nocrash.dark.svg +5 -0
- package/dist/nodes/Nocrash/nocrash.svg +5 -0
- package/dist/nodes/Nocrash/shared/graderClient.d.ts +18 -0
- package/dist/nodes/Nocrash/shared/graderClient.js +17 -0
- package/dist/nodes/Nocrash/shared/graderClient.js.map +1 -0
- package/dist/nodes/Nocrash/shared/n8nApiClient.d.ts +8 -0
- package/dist/nodes/Nocrash/shared/n8nApiClient.js +52 -0
- package/dist/nodes/Nocrash/shared/n8nApiClient.js.map +1 -0
- package/dist/nodes/Nocrash/shared/renderTeasers.d.ts +6 -0
- package/dist/nodes/Nocrash/shared/renderTeasers.js +18 -0
- package/dist/nodes/Nocrash/shared/renderTeasers.js.map +1 -0
- package/dist/nodes/Nocrash/shared/stripCredentials.d.ts +12 -0
- package/dist/nodes/Nocrash/shared/stripCredentials.js +45 -0
- package/dist/nodes/Nocrash/shared/stripCredentials.js.map +1 -0
- package/dist/package.json +63 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +63 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 NoCrash
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# n8n-nodes-nocrash
|
|
2
|
+
|
|
3
|
+
**Grade your entire n8n in 30 seconds. Free.**
|
|
4
|
+
|
|
5
|
+
This is an [n8n community node](https://docs.n8n.io/integrations/community-nodes/). Drop it into a workflow, point it at your own n8n, and get an instant X-ray of how well every workflow is built — a design grade out of 100, a per-workflow scorecard, and the one issue holding each one back. No account required to try it.
|
|
6
|
+
|
|
7
|
+
The grade tells you how *solid* your workflows are. It doesn't tell you when one quietly stops running. For that, connect your instance to NoCrash — and we'll watch every workflow around the clock and tell you, in plain language, the moment something breaks. Before your customers do.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Sample audit output
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
Instance grade: 72 / 100 · Needs a look · 18 workflows graded
|
|
15
|
+
|
|
16
|
+
┌─────────────────────────────────┬───────┬─────────┬──────────────────────────────┐
|
|
17
|
+
│ Workflow │ Score │ Band │ Top issue │
|
|
18
|
+
├─────────────────────────────────┼───────┼─────────┼──────────────────────────────┤
|
|
19
|
+
│ Sync orders to Sheets │ 88 │ green │ No error handling on HTTP │
|
|
20
|
+
│ Lead enrichment │ 56 │ yellow │ No retry on failed requests │
|
|
21
|
+
│ Nightly DB backup │ 34 │ red │ Silent fail: no alert path │
|
|
22
|
+
└─────────────────────────────────┴───────┴─────────┴──────────────────────────────┘
|
|
23
|
+
|
|
24
|
+
Connect to NoCrash and we watch every workflow 24/7: a runtime Reliability
|
|
25
|
+
Score, AI root-cause + fix, a daily plain-language brief, and a 3am alert
|
|
26
|
+
(Telegram, email, Discord, or Slack) the moment one silently breaks.
|
|
27
|
+
|
|
28
|
+
→ Start free: https://nocrash.io/?source=n8n-node-audit
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Your data stays yours
|
|
34
|
+
|
|
35
|
+
> **The grading runs inside your own n8n with your own API key. Every credential and secret is stripped out on your machine before anything leaves it. We never store your workflow definitions.**
|
|
36
|
+
|
|
37
|
+
The node lists your workflows and reads how they're built, using your own n8n API key. Before any workflow is sent to the NoCrash Grader, every credential reference and secret-bearing field is removed locally (see [`stripCredentials`](nodes/Nocrash/shared/stripCredentials.ts)). The free grade looks at **design only** — it never reads what your workflows actually ran or any of your data.
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Free vs Connected
|
|
42
|
+
|
|
43
|
+
| | **Free (this node)** | **Connected to NoCrash** |
|
|
44
|
+
|---|---|---|
|
|
45
|
+
| Static workflow **Grade** (how well it's built) | ✅ | ✅ |
|
|
46
|
+
| Design-issue detection | ✅ | ✅ |
|
|
47
|
+
| Instance scorecard | ✅ | ✅ |
|
|
48
|
+
| Runtime **Reliability Score** (how it's actually behaving) | — | ✅ |
|
|
49
|
+
| AI root-cause + fix | — | ✅ |
|
|
50
|
+
| 24/7 watch — we notice when a workflow goes quiet | — | ✅ |
|
|
51
|
+
| 3am alerts — Telegram, email, Discord, and Slack | — | ✅ |
|
|
52
|
+
| Daily plain-language brief | — | ✅ |
|
|
53
|
+
|
|
54
|
+
The free grade is a one-time, design-only check — it tells you how well your workflows are built. It does **not** watch them or know when something breaks. Connecting to NoCrash adds the runtime side: continuous watching, plain-language alerts, and a daily brief.
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## Operations
|
|
59
|
+
|
|
60
|
+
### Audit my n8n (default)
|
|
61
|
+
|
|
62
|
+
Grades every workflow in your instance and returns one item: the instance grade, a per-workflow scorecard, and a link to start watching them for real.
|
|
63
|
+
|
|
64
|
+
- **Credential:** *NoCrash — Your n8n API* (your own n8n instance URL + API key)
|
|
65
|
+
- **Scope:** All workflows / Active only
|
|
66
|
+
- **Max Workflows:** up to 50 per audit
|
|
67
|
+
|
|
68
|
+
### Heartbeat
|
|
69
|
+
|
|
70
|
+
Confirms a workflow ran by sending a ping to a NoCrash watch.
|
|
71
|
+
|
|
72
|
+
- **Credential:** *NoCrash API* (your `nc_` key)
|
|
73
|
+
- **Monitor ID** (required), optional Execution ID / Duration / Metadata
|
|
74
|
+
|
|
75
|
+
### Report Failure
|
|
76
|
+
|
|
77
|
+
Records that a workflow failed, with error details.
|
|
78
|
+
|
|
79
|
+
- **Credential:** *NoCrash API* (your `nc_` key)
|
|
80
|
+
- **Monitor ID** + **Error Message** (required), optional Failed Node / Execution ID
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## Install
|
|
85
|
+
|
|
86
|
+
In n8n: **Settings → Community Nodes → Install**, then enter:
|
|
87
|
+
|
|
88
|
+
```
|
|
89
|
+
n8n-nodes-nocrash
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Or via npm in a self-hosted instance:
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
npm install n8n-nodes-nocrash
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## Credentials
|
|
101
|
+
|
|
102
|
+
- **NoCrash — Your n8n API** — your n8n instance URL + an n8n API key (Settings → API in your n8n). Used only for the audit. Credentials are stripped before any workflow design is sent.
|
|
103
|
+
- **NoCrash API** — your NoCrash key (starts with `nc_`), created in the NoCrash dashboard under Settings → API keys. Used for Heartbeat and Report Failure.
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
## Templates
|
|
108
|
+
|
|
109
|
+
Five ready-to-import starter workflows live in [`templates/`](templates/) — a daily self-grade to Slack or Telegram, a dead-man's-switch heartbeat, an auto-report-on-error workflow, and a weekly reliability scorecard. Each one is a well-built n8n workflow you can adapt to your own steps. See [`templates/README.md`](templates/README.md).
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
## Links
|
|
114
|
+
|
|
115
|
+
- Public n8n Workflow Grader: <https://nocrash.io/tools/n8n-workflow-grader>
|
|
116
|
+
- Start watching your n8n: <https://nocrash.io/>
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
## License
|
|
121
|
+
|
|
122
|
+
[MIT](LICENSE)
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { IAuthenticateGeneric, Icon, ICredentialTestRequest, ICredentialType, INodeProperties } from "n8n-workflow";
|
|
2
|
+
export declare class NocrashApi implements ICredentialType {
|
|
3
|
+
name: string;
|
|
4
|
+
displayName: string;
|
|
5
|
+
icon: Icon;
|
|
6
|
+
documentationUrl: string;
|
|
7
|
+
properties: INodeProperties[];
|
|
8
|
+
authenticate: IAuthenticateGeneric;
|
|
9
|
+
test: ICredentialTestRequest;
|
|
10
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NocrashApi = void 0;
|
|
4
|
+
class NocrashApi {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.name = "nocrashApi";
|
|
7
|
+
this.displayName = "NoCrash API";
|
|
8
|
+
this.icon = { light: "file:icons/nocrash.svg", dark: "file:icons/nocrash.dark.svg" };
|
|
9
|
+
this.documentationUrl = "https://nocrash.io/docs/api";
|
|
10
|
+
this.properties = [
|
|
11
|
+
{
|
|
12
|
+
displayName: "NoCrash API Key",
|
|
13
|
+
name: "apiKey",
|
|
14
|
+
type: "string",
|
|
15
|
+
typeOptions: { password: true },
|
|
16
|
+
default: "",
|
|
17
|
+
required: true,
|
|
18
|
+
placeholder: "nc_...",
|
|
19
|
+
description: "Your NoCrash API key (starts with nc_). Create one in the NoCrash dashboard under Settings -> API keys.",
|
|
20
|
+
},
|
|
21
|
+
];
|
|
22
|
+
this.authenticate = {
|
|
23
|
+
type: "generic",
|
|
24
|
+
properties: {
|
|
25
|
+
headers: {
|
|
26
|
+
Authorization: "=Bearer {{$credentials.apiKey}}",
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
this.test = {
|
|
31
|
+
request: {
|
|
32
|
+
baseURL: "https://nocrash.io",
|
|
33
|
+
url: "/api/v1/me",
|
|
34
|
+
method: "GET",
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
exports.NocrashApi = NocrashApi;
|
|
40
|
+
//# sourceMappingURL=NocrashApi.credentials.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NocrashApi.credentials.js","sourceRoot":"","sources":["../../credentials/NocrashApi.credentials.ts"],"names":[],"mappings":";;;AAgBA,MAAa,UAAU;IAAvB;QACE,SAAI,GAAG,YAAY,CAAC;QAEpB,gBAAW,GAAG,aAAa,CAAC;QAE5B,SAAI,GAAS,EAAE,KAAK,EAAE,wBAAwB,EAAE,IAAI,EAAE,6BAA6B,EAAE,CAAC;QAEtF,qBAAgB,GAAG,6BAA6B,CAAC;QAEjD,eAAU,GAAsB;YAC9B;gBACE,WAAW,EAAE,iBAAiB;gBAC9B,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;gBAC/B,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,QAAQ;gBACrB,WAAW,EACT,yGAAyG;aAC5G;SACF,CAAC;QAEF,iBAAY,GAAyB;YACnC,IAAI,EAAE,SAAS;YACf,UAAU,EAAE;gBACV,OAAO,EAAE;oBACP,aAAa,EAAE,iCAAiC;iBACjD;aACF;SACF,CAAC;QAEF,SAAI,GAA2B;YAC7B,OAAO,EAAE;gBACP,OAAO,EAAE,oBAAoB;gBAC7B,GAAG,EAAE,YAAY;gBACjB,MAAM,EAAE,KAAK;aACd;SACF,CAAC;IACJ,CAAC;CAAA;AAvCD,gCAuCC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { IAuthenticateGeneric, Icon, ICredentialTestRequest, ICredentialType, INodeProperties } from "n8n-workflow";
|
|
2
|
+
export declare class NocrashN8nApi implements ICredentialType {
|
|
3
|
+
name: string;
|
|
4
|
+
displayName: string;
|
|
5
|
+
icon: Icon;
|
|
6
|
+
documentationUrl: string;
|
|
7
|
+
properties: INodeProperties[];
|
|
8
|
+
authenticate: IAuthenticateGeneric;
|
|
9
|
+
test: ICredentialTestRequest;
|
|
10
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NocrashN8nApi = void 0;
|
|
4
|
+
class NocrashN8nApi {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.name = "nocrashN8nApi";
|
|
7
|
+
this.displayName = 'NoCrash - Your N8n Instance API';
|
|
8
|
+
this.icon = { light: "file:icons/nocrash.svg", dark: "file:icons/nocrash.dark.svg" };
|
|
9
|
+
this.documentationUrl = "https://docs.n8n.io/api/authentication/";
|
|
10
|
+
this.properties = [
|
|
11
|
+
{
|
|
12
|
+
displayName: "n8n Instance URL",
|
|
13
|
+
name: "instanceUrl",
|
|
14
|
+
type: "string",
|
|
15
|
+
default: "",
|
|
16
|
+
required: true,
|
|
17
|
+
placeholder: "https://your-instance.app.n8n.cloud",
|
|
18
|
+
description: "The base URL of your own n8n instance (no trailing slash needed)",
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
displayName: "n8n API Key",
|
|
22
|
+
name: "apiKey",
|
|
23
|
+
type: "string",
|
|
24
|
+
typeOptions: { password: true },
|
|
25
|
+
default: "",
|
|
26
|
+
required: true,
|
|
27
|
+
description: "Create one in your n8n under Settings -> API. NoCrash reads workflow design only; credentials are stripped before anything is sent.",
|
|
28
|
+
},
|
|
29
|
+
];
|
|
30
|
+
this.authenticate = {
|
|
31
|
+
type: "generic",
|
|
32
|
+
properties: {
|
|
33
|
+
headers: {
|
|
34
|
+
"X-N8N-API-KEY": "={{$credentials.apiKey}}",
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
this.test = {
|
|
39
|
+
request: {
|
|
40
|
+
baseURL: "={{$credentials.instanceUrl.replace(/\\/+$/, '')}}",
|
|
41
|
+
url: "/api/v1/workflows",
|
|
42
|
+
method: "GET",
|
|
43
|
+
qs: { limit: 1 },
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
exports.NocrashN8nApi = NocrashN8nApi;
|
|
49
|
+
//# sourceMappingURL=NocrashN8nApi.credentials.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NocrashN8nApi.credentials.js","sourceRoot":"","sources":["../../credentials/NocrashN8nApi.credentials.ts"],"names":[],"mappings":";;;AAgBA,MAAa,aAAa;IAA1B;QACE,SAAI,GAAG,eAAe,CAAC;QAEvB,gBAAW,GAAG,iCAAiC,CAAC;QAEhD,SAAI,GAAS,EAAE,KAAK,EAAE,wBAAwB,EAAE,IAAI,EAAE,6BAA6B,EAAE,CAAC;QAEtF,qBAAgB,GAAG,yCAAyC,CAAC;QAE7D,eAAU,GAAsB;YAC9B;gBACE,WAAW,EAAE,kBAAkB;gBAC/B,IAAI,EAAE,aAAa;gBACnB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,qCAAqC;gBAClD,WAAW,EACT,kEAAkE;aACrE;YACD;gBACE,WAAW,EAAE,aAAa;gBAC1B,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;gBAC/B,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;gBACd,WAAW,EACT,qIAAqI;aACxI;SACF,CAAC;QAEF,iBAAY,GAAyB;YACnC,IAAI,EAAE,SAAS;YACf,UAAU,EAAE;gBACV,OAAO,EAAE;oBACP,eAAe,EAAE,0BAA0B;iBAC5C;aACF;SACF,CAAC;QAEF,SAAI,GAA2B;YAC7B,OAAO,EAAE;gBACP,OAAO,EAAE,oDAAoD;gBAC7D,GAAG,EAAE,mBAAmB;gBACxB,MAAM,EAAE,KAAK;gBACb,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE;aACjB;SACF,CAAC;IACJ,CAAC;CAAA;AAjDD,sCAiDC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg width="64" height="64" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<rect width="64" height="64" rx="14" fill="#FAFAFA"/>
|
|
3
|
+
<path d="M32 12L50 21V33C50 43.5 42.5 51.3 32 54C21.5 51.3 14 43.5 14 33V21L32 12Z" fill="#FFFFFF" stroke="#6366F1" stroke-width="2.5" stroke-linejoin="round"/>
|
|
4
|
+
<path d="M24 33L30 39L42 26" stroke="#6366F1" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
5
|
+
</svg>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg width="64" height="64" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<rect width="64" height="64" rx="14" fill="#18181B"/>
|
|
3
|
+
<path d="M32 12L50 21V33C50 43.5 42.5 51.3 32 54C21.5 51.3 14 43.5 14 33V21L32 12Z" fill="#1F1F23" stroke="#6366F1" stroke-width="2.5" stroke-linejoin="round"/>
|
|
4
|
+
<path d="M24 33L30 39L42 26" stroke="#6366F1" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
5
|
+
</svg>
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Nocrash = void 0;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
const AuditDescription_1 = require("./descriptions/AuditDescription");
|
|
6
|
+
const HeartbeatDescription_1 = require("./descriptions/HeartbeatDescription");
|
|
7
|
+
const ReportFailureDescription_1 = require("./descriptions/ReportFailureDescription");
|
|
8
|
+
const stripCredentials_1 = require("./shared/stripCredentials");
|
|
9
|
+
const graderClient_1 = require("./shared/graderClient");
|
|
10
|
+
const n8nApiClient_1 = require("./shared/n8nApiClient");
|
|
11
|
+
const renderTeasers_1 = require("./shared/renderTeasers");
|
|
12
|
+
const DEFAULT_NOCRASH_BASE_URL = "https://nocrash.io";
|
|
13
|
+
class Nocrash {
|
|
14
|
+
constructor() {
|
|
15
|
+
this.description = {
|
|
16
|
+
displayName: "NoCrash",
|
|
17
|
+
name: "nocrash",
|
|
18
|
+
icon: { light: "file:nocrash.svg", dark: "file:nocrash.dark.svg" },
|
|
19
|
+
group: ["transform"],
|
|
20
|
+
version: [1],
|
|
21
|
+
subtitle: '={{$parameter["operation"]}}',
|
|
22
|
+
description: "Audit your entire n8n in 30 seconds, free. Then connect to catch silent failures before your customers do.",
|
|
23
|
+
defaults: {
|
|
24
|
+
name: "NoCrash",
|
|
25
|
+
},
|
|
26
|
+
inputs: [n8n_workflow_1.NodeConnectionTypes.Main],
|
|
27
|
+
outputs: [n8n_workflow_1.NodeConnectionTypes.Main],
|
|
28
|
+
usableAsTool: true,
|
|
29
|
+
credentials: [
|
|
30
|
+
{
|
|
31
|
+
name: "nocrashN8nApi",
|
|
32
|
+
required: true,
|
|
33
|
+
displayOptions: {
|
|
34
|
+
show: { operation: ["audit"] },
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
name: "nocrashApi",
|
|
39
|
+
required: true,
|
|
40
|
+
displayOptions: {
|
|
41
|
+
show: { operation: ["heartbeat", "reportFailure"] },
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
],
|
|
45
|
+
properties: [
|
|
46
|
+
{
|
|
47
|
+
displayName: "Operation",
|
|
48
|
+
name: "operation",
|
|
49
|
+
type: "options",
|
|
50
|
+
noDataExpression: true,
|
|
51
|
+
default: "audit",
|
|
52
|
+
options: [
|
|
53
|
+
{
|
|
54
|
+
name: "Audit My N8n",
|
|
55
|
+
value: "audit",
|
|
56
|
+
description: "Grade every workflow in your n8n and get an instance scorecard (free, static design grade)",
|
|
57
|
+
action: "Audit my n8n",
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
name: "Heartbeat",
|
|
61
|
+
value: "heartbeat",
|
|
62
|
+
description: "Send a heartbeat to confirm a workflow is running",
|
|
63
|
+
action: "Send a heartbeat",
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
name: "Report Failure",
|
|
67
|
+
value: "reportFailure",
|
|
68
|
+
description: "Record that a workflow failed, with error details",
|
|
69
|
+
action: "Report a failure",
|
|
70
|
+
},
|
|
71
|
+
],
|
|
72
|
+
},
|
|
73
|
+
...AuditDescription_1.auditFields,
|
|
74
|
+
...HeartbeatDescription_1.heartbeatFields,
|
|
75
|
+
...ReportFailureDescription_1.reportFailureFields,
|
|
76
|
+
{
|
|
77
|
+
displayName: "NoCrash Base URL",
|
|
78
|
+
name: "nocrashBaseUrl",
|
|
79
|
+
type: "string",
|
|
80
|
+
default: DEFAULT_NOCRASH_BASE_URL,
|
|
81
|
+
description: "Advanced: override the NoCrash base URL (for development/self-hosted testing)",
|
|
82
|
+
displayOptions: {
|
|
83
|
+
show: { "@version": [1] },
|
|
84
|
+
},
|
|
85
|
+
typeOptions: {},
|
|
86
|
+
},
|
|
87
|
+
],
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
async execute() {
|
|
91
|
+
const operation = this.getNodeParameter("operation", 0);
|
|
92
|
+
const nocrashBaseUrl = (this.getNodeParameter("nocrashBaseUrl", 0, DEFAULT_NOCRASH_BASE_URL) ||
|
|
93
|
+
DEFAULT_NOCRASH_BASE_URL).trim();
|
|
94
|
+
if (operation === "audit") {
|
|
95
|
+
return [await runAudit.call(this, nocrashBaseUrl)];
|
|
96
|
+
}
|
|
97
|
+
const items = this.getInputData();
|
|
98
|
+
const returnData = [];
|
|
99
|
+
for (let i = 0; i < items.length; i++) {
|
|
100
|
+
try {
|
|
101
|
+
if (operation === "heartbeat") {
|
|
102
|
+
returnData.push(await runHeartbeat.call(this, i, nocrashBaseUrl));
|
|
103
|
+
}
|
|
104
|
+
else if (operation === "reportFailure") {
|
|
105
|
+
returnData.push(await runReportFailure.call(this, i, nocrashBaseUrl));
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Unknown operation: ${operation}`, { itemIndex: i });
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
catch (error) {
|
|
112
|
+
if (this.continueOnFail()) {
|
|
113
|
+
returnData.push({ json: { error: error.message }, pairedItem: i });
|
|
114
|
+
continue;
|
|
115
|
+
}
|
|
116
|
+
throw new n8n_workflow_1.NodeApiError(this.getNode(), error, { itemIndex: i });
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
return [returnData];
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
exports.Nocrash = Nocrash;
|
|
123
|
+
async function runAudit(nocrashBaseUrl) {
|
|
124
|
+
var _a, _b;
|
|
125
|
+
const scope = this.getNodeParameter("scope", 0, "all");
|
|
126
|
+
const requestedMax = this.getNodeParameter("maxWorkflows", 0, graderClient_1.GRADER_BATCH_CAP);
|
|
127
|
+
const activeOnly = scope === "active";
|
|
128
|
+
const maxWorkflows = Math.min(Math.max(1, requestedMax), graderClient_1.GRADER_BATCH_CAP);
|
|
129
|
+
const summaries = await (0, n8nApiClient_1.listWorkflowSummaries)(this, activeOnly, maxWorkflows + 1);
|
|
130
|
+
const localCapped = summaries.length > maxWorkflows;
|
|
131
|
+
const toGrade = summaries.slice(0, maxWorkflows);
|
|
132
|
+
const strippedWorkflows = [];
|
|
133
|
+
for (const summary of toGrade) {
|
|
134
|
+
const detail = await (0, n8nApiClient_1.getWorkflowDetail)(this, summary.id);
|
|
135
|
+
strippedWorkflows.push((0, stripCredentials_1.stripCredentials)(detail));
|
|
136
|
+
}
|
|
137
|
+
let grade;
|
|
138
|
+
try {
|
|
139
|
+
grade = await (0, graderClient_1.gradeBatch)(this, nocrashBaseUrl, strippedWorkflows);
|
|
140
|
+
}
|
|
141
|
+
catch (error) {
|
|
142
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `NoCrash Grader request failed: ${error.message}`, { itemIndex: 0 });
|
|
143
|
+
}
|
|
144
|
+
const workflows = (0, renderTeasers_1.attachTeasers)((_a = grade.workflows) !== null && _a !== void 0 ? _a : []);
|
|
145
|
+
const connectUrl = (0, renderTeasers_1.buildConnectUrl)(nocrashBaseUrl);
|
|
146
|
+
const capped = Boolean(grade.capped) || localCapped;
|
|
147
|
+
const capReason = (_b = grade.cap_reason) !== null && _b !== void 0 ? _b : (localCapped
|
|
148
|
+
? `Graded the first ${maxWorkflows} of ${summaries.length}+ workflows. Connect to NoCrash to grade them all.`
|
|
149
|
+
: null);
|
|
150
|
+
return [
|
|
151
|
+
{
|
|
152
|
+
json: {
|
|
153
|
+
instanceScore: grade.instance_score,
|
|
154
|
+
instanceBand: grade.instance_band,
|
|
155
|
+
instanceBandLabel: grade.instance_band_label,
|
|
156
|
+
workflowCount: grade.workflow_count,
|
|
157
|
+
workflows,
|
|
158
|
+
capped,
|
|
159
|
+
capReason,
|
|
160
|
+
connectUrl,
|
|
161
|
+
},
|
|
162
|
+
pairedItem: 0,
|
|
163
|
+
},
|
|
164
|
+
];
|
|
165
|
+
}
|
|
166
|
+
async function runHeartbeat(itemIndex, nocrashBaseUrl) {
|
|
167
|
+
const monitorId = this.getNodeParameter("monitorId", itemIndex);
|
|
168
|
+
const executionId = this.getNodeParameter("executionId", itemIndex, "");
|
|
169
|
+
const durationMs = this.getNodeParameter("durationMs", itemIndex, 0);
|
|
170
|
+
const metadataRaw = this.getNodeParameter("metadata", itemIndex, "{}");
|
|
171
|
+
const body = {};
|
|
172
|
+
if (executionId) {
|
|
173
|
+
body.executionId = executionId;
|
|
174
|
+
}
|
|
175
|
+
if (durationMs > 0) {
|
|
176
|
+
body.durationMs = durationMs;
|
|
177
|
+
}
|
|
178
|
+
const metadata = parseOptionalJson.call(this, metadataRaw, itemIndex, "Metadata");
|
|
179
|
+
if (metadata !== undefined) {
|
|
180
|
+
body.metadata = metadata;
|
|
181
|
+
}
|
|
182
|
+
const baseUrl = nocrashBaseUrl.replace(/\/+$/, "");
|
|
183
|
+
const response = await this.helpers.httpRequestWithAuthentication.call(this, "nocrashApi", {
|
|
184
|
+
method: "POST",
|
|
185
|
+
url: `${baseUrl}/api/v1/monitors/${encodeURIComponent(monitorId)}/ping`,
|
|
186
|
+
body,
|
|
187
|
+
json: true,
|
|
188
|
+
});
|
|
189
|
+
return { json: response, pairedItem: itemIndex };
|
|
190
|
+
}
|
|
191
|
+
async function runReportFailure(itemIndex, nocrashBaseUrl) {
|
|
192
|
+
const monitorId = this.getNodeParameter("monitorId", itemIndex);
|
|
193
|
+
const errorMessage = this.getNodeParameter("errorMessage", itemIndex);
|
|
194
|
+
const failedNode = this.getNodeParameter("failedNode", itemIndex, "");
|
|
195
|
+
const executionId = this.getNodeParameter("executionId", itemIndex, "");
|
|
196
|
+
const body = { errorMessage };
|
|
197
|
+
if (failedNode) {
|
|
198
|
+
body.failedNode = failedNode;
|
|
199
|
+
}
|
|
200
|
+
if (executionId) {
|
|
201
|
+
body.executionId = executionId;
|
|
202
|
+
}
|
|
203
|
+
const baseUrl = nocrashBaseUrl.replace(/\/+$/, "");
|
|
204
|
+
const response = await this.helpers.httpRequestWithAuthentication.call(this, "nocrashApi", {
|
|
205
|
+
method: "POST",
|
|
206
|
+
url: `${baseUrl}/api/v1/monitors/${encodeURIComponent(monitorId)}/fail`,
|
|
207
|
+
body,
|
|
208
|
+
json: true,
|
|
209
|
+
});
|
|
210
|
+
return { json: response, pairedItem: itemIndex };
|
|
211
|
+
}
|
|
212
|
+
function parseOptionalJson(raw, itemIndex, fieldLabel) {
|
|
213
|
+
const trimmed = (raw !== null && raw !== void 0 ? raw : "").trim();
|
|
214
|
+
if (trimmed === "" || trimmed === "{}") {
|
|
215
|
+
return undefined;
|
|
216
|
+
}
|
|
217
|
+
try {
|
|
218
|
+
return JSON.parse(trimmed);
|
|
219
|
+
}
|
|
220
|
+
catch {
|
|
221
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `${fieldLabel} is not valid JSON`, { itemIndex });
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
//# sourceMappingURL=Nocrash.node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Nocrash.node.js","sourceRoot":"","sources":["../../../nodes/Nocrash/Nocrash.node.ts"],"names":[],"mappings":";;;AAQA,+CAAqF;AAErF,sEAA8D;AAC9D,8EAAsE;AACtE,sFAA8E;AAE9E,gEAA6D;AAC7D,wDAI+B;AAC/B,wDAG+B;AAC/B,0DAAwE;AAGxE,MAAM,wBAAwB,GAAG,oBAAoB,CAAC;AAEtD,MAAa,OAAO;IAApB;QACE,gBAAW,GAAyB;YAClC,WAAW,EAAE,SAAS;YACtB,IAAI,EAAE,SAAS;YACf,IAAI,EAAE,EAAE,KAAK,EAAE,kBAAkB,EAAE,IAAI,EAAE,uBAAuB,EAAE;YAClE,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC,CAAC,CAAC;YACZ,QAAQ,EAAE,8BAA8B;YACxC,WAAW,EACT,4GAA4G;YAC9G,QAAQ,EAAE;gBACR,IAAI,EAAE,SAAS;aAChB;YACD,MAAM,EAAE,CAAC,kCAAmB,CAAC,IAAI,CAAC;YAClC,OAAO,EAAE,CAAC,kCAAmB,CAAC,IAAI,CAAC;YACnC,YAAY,EAAE,IAAI;YAClB,WAAW,EAAE;gBACX;oBACE,IAAI,EAAE,eAAe;oBACrB,QAAQ,EAAE,IAAI;oBACd,cAAc,EAAE;wBACd,IAAI,EAA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
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"node": "n8n-nodes-nocrash.nocrash",
|
|
3
|
+
"nodeVersion": "1.0",
|
|
4
|
+
"codexVersion": "1.0",
|
|
5
|
+
"categories": ["Development", "Developer Tools"],
|
|
6
|
+
"resources": {
|
|
7
|
+
"credentialDocumentation": [
|
|
8
|
+
{
|
|
9
|
+
"url": "https://github.com/nocrashio/n8n-nodes-nocrash?tab=readme-ov-file#credentials"
|
|
10
|
+
}
|
|
11
|
+
],
|
|
12
|
+
"primaryDocumentation": [
|
|
13
|
+
{
|
|
14
|
+
"url": "https://github.com/nocrashio/n8n-nodes-nocrash?tab=readme-ov-file"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.auditFields = void 0;
|
|
4
|
+
exports.auditFields = [
|
|
5
|
+
{
|
|
6
|
+
displayName: "Scope",
|
|
7
|
+
name: "scope",
|
|
8
|
+
type: "options",
|
|
9
|
+
default: "all",
|
|
10
|
+
description: "Which workflows in your n8n to include in the audit",
|
|
11
|
+
options: [
|
|
12
|
+
{
|
|
13
|
+
name: "All Workflows",
|
|
14
|
+
value: "all",
|
|
15
|
+
description: "Grade every workflow in your instance",
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
name: "Active Only",
|
|
19
|
+
value: "active",
|
|
20
|
+
description: "Grade only workflows that are currently active",
|
|
21
|
+
},
|
|
22
|
+
],
|
|
23
|
+
displayOptions: {
|
|
24
|
+
show: { operation: ["audit"] },
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
displayName: "Max Workflows",
|
|
29
|
+
name: "maxWorkflows",
|
|
30
|
+
type: "number",
|
|
31
|
+
default: 50,
|
|
32
|
+
typeOptions: { minValue: 1, maxValue: 50 },
|
|
33
|
+
description: "How many workflows to grade (the Grader accepts up to 50 per audit)",
|
|
34
|
+
displayOptions: {
|
|
35
|
+
show: { operation: ["audit"] },
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
];
|
|
39
|
+
//# sourceMappingURL=AuditDescription.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AuditDescription.js","sourceRoot":"","sources":["../../../../nodes/Nocrash/descriptions/AuditDescription.ts"],"names":[],"mappings":";;;AAQa,QAAA,WAAW,GAAsB;IAC5C;QACE,WAAW,EAAE,OAAO;QACpB,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,KAAK;QACd,WAAW,EAAE,qDAAqD;QAClE,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,eAAe;gBACrB,KAAK,EAAE,KAAK;gBACZ,WAAW,EAAE,uCAAuC;aACrD;YACD;gBACE,IAAI,EAAE,aAAa;gBACnB,KAAK,EAAE,QAAQ;gBACf,WAAW,EAAE,gDAAgD;aAC9D;SACF;QACD,cAAc,EAAE;YACd,IAAI,EAAE,EAAE,SAAS,EAAE,CAAC,OAAO,CAAC,EAAE;SAC/B;KACF;IACD;QACE,WAAW,EAAE,eAAe;QAC5B,IAAI,EAAE,cAAc;QACpB,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,EAAE,QAAQ,EAAE,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;QAC1C,WAAW,EACT,qEAAqE;QACvE,cAAc,EAAE;YACd,IAAI,EAAE,EAAE,SAAS,EAAE,CAAC,OAAO,CAAC,EAAE;SAC/B;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.heartbeatFields = void 0;
|
|
4
|
+
exports.heartbeatFields = [
|
|
5
|
+
{
|
|
6
|
+
displayName: "Monitor ID",
|
|
7
|
+
name: "monitorId",
|
|
8
|
+
type: "string",
|
|
9
|
+
default: "",
|
|
10
|
+
required: true,
|
|
11
|
+
description: "Which NoCrash watch this heartbeat is for (its Monitor ID, from your NoCrash dashboard)",
|
|
12
|
+
displayOptions: {
|
|
13
|
+
show: { operation: ["heartbeat"] },
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
displayName: "Execution ID",
|
|
18
|
+
name: "executionId",
|
|
19
|
+
type: "string",
|
|
20
|
+
default: "={{$execution.id}}",
|
|
21
|
+
description: 'Optional n8n execution ID to correlate this heartbeat',
|
|
22
|
+
displayOptions: {
|
|
23
|
+
show: { operation: ["heartbeat"] },
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
displayName: "Duration (Ms)",
|
|
28
|
+
name: "durationMs",
|
|
29
|
+
type: "number",
|
|
30
|
+
default: 0,
|
|
31
|
+
description: "Optional run duration in milliseconds",
|
|
32
|
+
displayOptions: {
|
|
33
|
+
show: { operation: ["heartbeat"] },
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
displayName: "Metadata",
|
|
38
|
+
name: "metadata",
|
|
39
|
+
type: "json",
|
|
40
|
+
default: "{}",
|
|
41
|
+
description: "Optional JSON metadata to attach to this heartbeat",
|
|
42
|
+
displayOptions: {
|
|
43
|
+
show: { operation: ["heartbeat"] },
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
];
|
|
47
|
+
//# sourceMappingURL=HeartbeatDescription.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HeartbeatDescription.js","sourceRoot":"","sources":["../../../../nodes/Nocrash/descriptions/HeartbeatDescription.ts"],"names":[],"mappings":";;;AAQa,QAAA,eAAe,GAAsB;IAChD;QACE,WAAW,EAAE,YAAY;QACzB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,yFAAyF;QACtG,cAAc,EAAE;YACd,IAAI,EAAE,EAAE,SAAS,EAAE,CAAC,WAAW,CAAC,EAAE;SACnC;KACF;IACD;QACE,WAAW,EAAE,cAAc;QAC3B,IAAI,EAAE,aAAa;QACnB,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,oBAAoB;QAC7B,WAAW,EAAE,uDAAuD;QACpE,cAAc,EAAE;YACd,IAAI,EAAE,EAAE,SAAS,EAAE,CAAC,WAAW,CAAC,EAAE;SACnC;KACF;IACD;QACE,WAAW,EAAE,eAAe;QAC5B,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,CAAC;QACV,WAAW,EAAE,uCAAuC;QACpD,cAAc,EAAE;YACd,IAAI,EAAE,EAAE,SAAS,EAAE,CAAC,WAAW,CAAC,EAAE;SACnC;KACF;IACD;QACE,WAAW,EAAE,UAAU;QACvB,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,IAAI;QACb,WAAW,EAAE,oDAAoD;QACjE,cAAc,EAAE;YACd,IAAI,EAAE,EAAE,SAAS,EAAE,CAAC,WAAW,CAAC,EAAE;SACnC;KACF;CACF,CAAC"}
|