Skip to content

Commit 96dd53a

Browse files
ikbendionDion Blonkclaude
authored
Fix bugs and improve token handling and pagination support (#8)
* fixbugs -> dev (#5) * Create publish-npm.yml * Update publish-npm.yml * fix retry-after * add .gitignore * fix: add readme.md and package.json * fix: remove resolveWithFullResponse, read response directly resolveWithFullResponse is a request-promise option that does not work reliably in all n8n versions. The response body is now used directly, avoiding silent undefined output when the option is ignored. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix: remove unused Scope and Authentication credential fields The node uses client credentials grant with a fixed resource URL — scope and authentication mode are never read. Showing them in the UI was misleading. Also updated documentationUrl to the service auth docs. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix: replace stale index.js node-discovery format The nodeTypes/credentialTypes format is from an old n8n API. Discovery is handled by the "n8n" key in package.json — index.js only needs to exist as the package main entry point. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix: extract requestWithRetry helper with exponential backoff and 503 support Previously the retry loop lived inline and only handled 429 with a fixed delay. Now a shared requestWithRetry helper covers both token fetches and Graph calls, handles 503 as well as 429, respects the Retry-After header when present, and falls back to exponential backoff (2 4 8 … 60s) otherwise. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix: track token expiry to prevent 401s in long-running executions Tokens are now cached with their expiry time (from expires_in). A cached token is reused only if it has more than 60 seconds remaining, avoiding silent 401 failures when a workflow runs longer than the token lifetime. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * feat: add Return All Pages option to follow @odata.nextLink pagination Without this, GET requests silently returned only the first page (default 100 items). When enabled, the node follows nextLink automatically and emits one output item per record, matching standard n8n node behaviour. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix: move n8n-core/n8n-workflow to peerDependencies, typescript to devDependencies Bundling n8n-core and n8n-workflow adds unnecessary weight and risks version conflicts with the host n8n instance. typescript is build-only and has no place in runtime dependencies. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * release: bump versioning --------- Co-authored-by: Dion Blonk <dblonk@gw-msd-001.exaflare.nl> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> * fix: add --legacy-peer-deps to CI install to avoid building n8n native addons Moving n8n-workflow to peerDependencies caused npm v7+ to auto-install it, pulling in isolated-vm (requires Node >=22) on a Node 18 runner. Using --legacy-peer-deps skips peer dep installation in CI — peer deps are provided by the host n8n instance at runtime, not during publish. * ci: remove npm publish step, run build CI on development branch * ci: run build on development, publish to npm only on main --------- Co-authored-by: Dion Blonk <dblonk@gw-msd-001.exaflare.nl> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 1c11d1c commit 96dd53a

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

.github/workflows/publish-npm.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
name: Publish NPM Package
1+
name: CI
22

33
on:
44
push:
55
branches:
66
- main
7+
- development
78

89
jobs:
9-
publish:
10+
build:
1011
runs-on: ubuntu-latest
1112

1213
steps:
@@ -26,6 +27,7 @@ jobs:
2627
run: npm run build
2728

2829
- name: Publish to npm
30+
if: github.ref == 'refs/heads/main'
2931
run: npm publish
3032
env:
3133
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)