Skip to content

Commit f19a1ef

Browse files
Release 1.0.5
- Use NodeApiError for HTTP errors to preserve status code and response body in n8n's error UI - Remove unused requestDefaults block (only meaningful for declarative-style nodes) - Add GitHub Actions publish workflow with npm provenance Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent db04e78 commit f19a1ef

3 files changed

Lines changed: 27 additions & 10 deletions

File tree

.github/workflows/publish.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Publish to npm
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
publish:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: read
12+
id-token: write
13+
steps:
14+
- uses: actions/checkout@v4
15+
- uses: actions/setup-node@v4
16+
with:
17+
node-version: 20
18+
registry-url: https://registry.npmjs.org
19+
- run: npm ci
20+
- run: npm run build
21+
- run: npm publish --provenance --access public
22+
env:
23+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

nodes/Spider/Spider.node.ts

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ import type {
44
INodeExecutionData,
55
INodeType,
66
INodeTypeDescription,
7+
JsonObject,
78
} from 'n8n-workflow';
8-
import { NodeConnectionTypes, NodeOperationError } from 'n8n-workflow';
9+
import { NodeApiError, NodeConnectionTypes } from 'n8n-workflow';
910

1011
export class Spider implements INodeType {
1112
description: INodeTypeDescription = {
@@ -28,13 +29,6 @@ export class Spider implements INodeType {
2829
required: true,
2930
},
3031
],
31-
requestDefaults: {
32-
baseURL: 'https://api.spider.cloud',
33-
headers: {
34-
Accept: 'application/json',
35-
'Content-Type': 'application/json',
36-
},
37-
},
3832
properties: [
3933
// ─── Operation ───────────────────────────────────────────────────────────
4034
{
@@ -472,7 +466,7 @@ export class Spider implements INodeType {
472466
});
473467
continue;
474468
}
475-
throw new NodeOperationError(this.getNode(), error as Error, { itemIndex: i });
469+
throw new NodeApiError(this.getNode(), error as JsonObject, { itemIndex: i });
476470
}
477471
}
478472

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@spider-cloud/n8n-nodes-spider",
3-
"version": "1.0.4",
3+
"version": "1.0.5",
44
"description": "n8n community node for Spider – the fastest web crawling and scraping API for AI agents",
55
"keywords": [
66
"n8n-community-node-package"

0 commit comments

Comments
 (0)