n8n-nodes-jitterflow 0.1.3 → 0.1.4

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/README.md CHANGED
@@ -35,6 +35,8 @@ All jitter math, TPS guarding, and DLQ decisioning happen server-side in Jitterf
35
35
 
36
36
  ## 🔑 Credential
37
37
 
38
+ No Jitterflow account yet? [Sign up free](https://jitterflow.io/signup/?ref=n8n-node) — takes about two minutes.
39
+
38
40
  Create a **Jitterflow API** credential:
39
41
 
40
42
  - [ ] Grab your tenant API key from the Jitterflow dashboard → **API Keys** (starts with `wjg_`)
@@ -67,4 +69,4 @@ npm run release
67
69
  | `npm run release` | Bumps the version, tags, and pushes |
68
70
  | `.github/workflows/publish.yml` | Takes it from there — build, `n8n-node lint`, publish to npm with provenance |
69
71
 
70
- > **⚠️ Requires** the `NPM_TOKEN` repo secret to be set.
72
+ > **🔑 Auth:** publishing uses npm's OIDC Trusted Publishing (configured on npmjs.com against this exact repo + workflow) — no `NPM_TOKEN` secret needed or used.
@@ -14,7 +14,7 @@ class JitterflowApi {
14
14
  typeOptions: { password: true },
15
15
  default: '',
16
16
  required: true,
17
- description: 'Your Jitterflow tenant API key (starts with wjg_). Find it in the Jitterflow dashboard under API Keys.',
17
+ description: 'Your Jitterflow tenant API key (starts with wjg_). Find it in the Jitterflow dashboard under API Keys. No account yet? Sign up free: https://jitterflow.io/signup/?ref=n8n-node',
18
18
  },
19
19
  {
20
20
  displayName: 'Base URL',
@@ -1,6 +1,17 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.jitterflowApiRequest = jitterflowApiRequest;
4
+ const n8n_workflow_1 = require("n8n-workflow");
5
+ const SIGNUP_HINT = "Don't have a Jitterflow API key yet? Sign up free: https://jitterflow.io/signup/?ref=n8n-node";
6
+ // The API's own 401 body ("Missing or malformed API key." / "Invalid API
7
+ // key.") is the exact moment a user without an account hits a wall — the
8
+ // highest-converting place to point them at signup, per the SEO/AEO audit's
9
+ // finding 06. Matched on message content rather than a status-code field
10
+ // since n8n's http helper's thrown-error shape isn't stable across versions;
11
+ // "API key" only appears in that one family of auth failures server-side.
12
+ function isMissingOrInvalidApiKeyError(error) {
13
+ return error instanceof Error && /api key/i.test(error.message);
14
+ }
4
15
  async function jitterflowApiRequest(method, path, body, qs) {
5
16
  const credentials = await this.getCredentials('jitterflowApi');
6
17
  const baseUrl = String(credentials.baseUrl || 'https://jitterflow.io').replace(/\/+$/, '');
@@ -11,5 +22,13 @@ async function jitterflowApiRequest(method, path, body, qs) {
11
22
  qs,
12
23
  json: true,
13
24
  };
14
- return this.helpers.httpRequestWithAuthentication.call(this, 'jitterflowApi', options);
25
+ try {
26
+ return await this.helpers.httpRequestWithAuthentication.call(this, 'jitterflowApi', options);
27
+ }
28
+ catch (error) {
29
+ if (isMissingOrInvalidApiKeyError(error)) {
30
+ error.message = `${error.message} ${SIGNUP_HINT}`;
31
+ }
32
+ throw new n8n_workflow_1.NodeApiError(this.getNode(), error);
33
+ }
15
34
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-jitterflow",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "n8n community node for Jitterflow — send webhooks through jittered, rate-limited delivery and manage the dead-letter queue (list, replay, resolve) from inside a workflow.",
5
5
  "keywords": [
6
6
  "n8n-community-node-package"
@@ -45,6 +45,7 @@
45
45
  },
46
46
  "devDependencies": {
47
47
  "@n8n/node-cli": "^0.44.5",
48
+ "eslint": "9.29.0",
48
49
  "n8n-workflow": "^2.16.0",
49
50
  "typescript": "^5.6.3",
50
51
  "jest": "^29.7.0",