fix(n8n): add missing entry point, fix auth header, add execution tests#1444
Merged
nicoloboschi merged 1 commit intomainfrom May 5, 2026
Merged
fix(n8n): add missing entry point, fix auth header, add execution tests#1444nicoloboschi merged 1 commit intomainfrom
nicoloboschi merged 1 commit intomainfrom
Conversation
- Add index.ts entry point (package.json "main" points to dist/index.js) - Fix credential auth header: use empty string instead of undefined to avoid sending literal "undefined" header for unauthenticated instances - Use SVG icon instead of PNG for crisper rendering - Remove unsafe `as IDataObject` casts on client call options, use proper Budget type import - Add node-execute.test.ts with mocked HindsightClient verifying all three operations (retain, recall, reflect) are called correctly
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #1364 addressing review findings:
index.tsentry point —package.jsondeclares"main": "dist/index.js"but there was no source file to produce it. Build would fail on publish."undefined"as the Authorization header value for self-hosted instances without an API key. Now sends empty string which n8n drops.file:hindsight.pngtofile:hindsight.svgfor crisper rendering in the node panel.as IDataObjectcasts — Import and use the properBudgettype from the client SDK instead of casting options objects.test/node-execute.test.tsmocksHindsightClientand verifies all three operations (retain, recall, reflect) are called with correct arguments, including edge cases (empty tags, missing bankId, continueOnFail error handling).Test plan
npm test)npm run build)test-n8n-integrationjob