@sateeshreddy/n8n-nodes-nvidia-nim 1.0.2 → 1.0.3
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/package.json +1 -1
- package/.claude/settings.local.json +0 -7
- package/Claude.md +0 -87
package/package.json
CHANGED
package/Claude.md
DELETED
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
# CLAUDE.md
|
|
2
|
-
|
|
3
|
-
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
|
4
|
-
|
|
5
|
-
## Project Overview
|
|
6
|
-
This repository contains the `n8n-nodes-nvidia-nim` package - an n8n community node that allows users to call any free model from NVIDIA NIM (build.nvidia.com) directly in their workflows. The node wraps NVIDIA's OpenAI-compatible REST API (`https://integrate.api.nvidia.com/v1`) with a friendly n8n UI.
|
|
7
|
-
|
|
8
|
-
## Repository Structure
|
|
9
|
-
```
|
|
10
|
-
n8n-nodes-nvidia-nim/
|
|
11
|
-
├── package.json
|
|
12
|
-
├── tsconfig.json
|
|
13
|
-
├── tsconfig.build.json
|
|
14
|
-
├── gulpfile.js
|
|
15
|
-
├── eslint.config.mjs
|
|
16
|
-
├── .gitignore
|
|
17
|
-
├── README.md
|
|
18
|
-
├── nodes/
|
|
19
|
-
│ └── NvidiaNim/
|
|
20
|
-
│ ├── NvidiaNim.node.ts # Main node logic (TypeScript)
|
|
21
|
-
│ ├── NvidiaNim.node.json # Node metadata/codex
|
|
22
|
-
│ └── nvidia-nim.svg # Node icon
|
|
23
|
-
└── credentials/
|
|
24
|
-
└── NvidiaNimApi.credentials.ts # API key credential definition
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
## Key Commands
|
|
28
|
-
All commands are executed by Claude Code within the project directory:
|
|
29
|
-
|
|
30
|
-
- **Install dependencies**: `npm install`
|
|
31
|
-
- **Lint code**: `npm run lint` (checks for TypeScript errors and enforces coding standards)
|
|
32
|
-
- **Fix lint issues**: `npm run lintfix` (auto-fixes lintable issues)
|
|
33
|
-
- **Format code**: `npm run format` (uses Prettier to format TypeScript and JSON files)
|
|
34
|
-
- **Build package**: `npm run build` (compiles TypeScript to dist/ and copies SVG icons)
|
|
35
|
-
- **Watch for changes**: `npm run dev` (TypeScript watch mode during development)
|
|
36
|
-
- **Prepublish checks**: `npm run prepublishOnly` (runs build and lint before publishing)
|
|
37
|
-
|
|
38
|
-
## Development Workflow
|
|
39
|
-
1. **Setup**: Run `npm install` to install dependencies
|
|
40
|
-
2. **Develop**: Use `npm run dev` for continuous TypeScript compilation
|
|
41
|
-
3. **Code Quality**:
|
|
42
|
-
- Run `npm run lint` to check for issues
|
|
43
|
-
- Run `npm run lintfix` to automatically fix lint issues
|
|
44
|
-
- Run `npm run format` to format code with Prettier
|
|
45
|
-
4. **Build**: Run `npm run build` to generate distributable files in `dist/`
|
|
46
|
-
5. **Test**: Manual testing can be done by linking to n8n (see notes below)
|
|
47
|
-
|
|
48
|
-
## Architecture Highlights
|
|
49
|
-
- **Node Implementation**: The main logic resides in `nodes/NvidiaNim/NvidiaNim.node.ts` which implements the `INodeType` interface from `n8n-workflow`
|
|
50
|
-
- **Credentials**: API key handling is defined in `credentials/NvidiaNimApi.credentials.ts` using n8n's credential system
|
|
51
|
-
- **Build Process**:
|
|
52
|
-
- TypeScript compilation via `tsc` (using `tsconfig.build.json` for production builds)
|
|
53
|
-
- SVG icon copying via Gulp (`gulpfile.js`)
|
|
54
|
-
- Output directed to `dist/` directory as specified in package.json
|
|
55
|
-
- **n8n Integration**:
|
|
56
|
-
- Package.json includes `n8n` section specifying nodes and credentials paths
|
|
57
|
-
- Uses `n8nNodesApiVersion: 1` for compatibility
|
|
58
|
-
- Leverages n8n's built-in `httpRequest` helper for API calls (no external dependencies)
|
|
59
|
-
|
|
60
|
-
## Testing Approach
|
|
61
|
-
While the project doesn't include automated test files, validation includes:
|
|
62
|
-
- **Build verification**: Confirming `npm run build` succeeds and produces expected output in `dist/`
|
|
63
|
-
- **TypeScript checking**: Ensuring no `any` type errors (warnings allowed) via ESLint
|
|
64
|
-
- **Lint compliance**: Zero warnings from `npm run lint`
|
|
65
|
-
- **Structural checks**: Verifying required files exist in correct locations post-build
|
|
66
|
-
- **Manual verification**: Smoke test script (`test/manual.ts`) to validate node description loads correctly
|
|
67
|
-
|
|
68
|
-
## Important Notes for Claude Code
|
|
69
|
-
1. **Do not ask users to run commands** - execute all commands yourself
|
|
70
|
-
2. **Always verify build output** - after `npm run build`, check that `dist/` contains:
|
|
71
|
-
- `dist/nodes/NvidiaNim/NvidiaNim.node.js`
|
|
72
|
-
- `dist/nodes/NvidiaNim/nvidia-nim.svg`
|
|
73
|
-
- `dist/credentials/NvidiaNimApi.credentials.js`
|
|
74
|
-
3. **Use n8n helpers** - rely on `this.helpers.httpRequest` for API calls, not external libraries
|
|
75
|
-
4. **Handle streaming properly** - when `stream: true`, collect SSE chunks before outputting
|
|
76
|
-
5. **Respect continueOnFail()** - wrap per-item processing in try/catch blocks
|
|
77
|
-
6. **No runtime dependencies** - avoid adding axios, node-fetch, etc.; use n8n's built-in helpers
|
|
78
|
-
7. **Expression support** - n8n automatically resolves expressions in `userMessage` and `systemPrompt` fields
|
|
79
|
-
|
|
80
|
-
## Common Issues to Watch For
|
|
81
|
-
- **Module not found**: Ensure `npm install` has been run for `n8n-workflow` dependency
|
|
82
|
-
- **Gulp not found**: Use `npx gulp build:icons` if gulp command missing
|
|
83
|
-
- **SVG not copied**: Verify gulpfile.js correctly copies SVG to dist/nodes/
|
|
84
|
-
- **Node not appearing**: Check package.json → n8n.nodes path matches actual dist file
|
|
85
|
-
- **Authentication errors**: API key must start with `nvapi-` and be obtained from build.nvidia.com
|
|
86
|
-
- **Model not found**: Use exact vendor/model-name format from build.nvidia.com
|
|
87
|
-
- **Rate limiting**: Free tier allows ~40 RPM; consider Wait nodes in tight loops
|