Compare commits

..

1 commit

Author SHA1 Message Date
dependabot[bot]
0e4e845554
Bump the npm_and_yarn group across 1 directory with 3 updates
Bumps the npm_and_yarn group with 2 updates in the / directory: [@azure/identity](https://github.com/Azure/azure-sdk-for-js) and [n8n-core](https://github.com/n8n-io/n8n).


Removes `@azure/identity`

Updates `n8n-core` from 1.14.1 to 1.81.0
- [Release notes](https://github.com/n8n-io/n8n/releases)
- [Changelog](https://github.com/n8n-io/n8n/blob/master/CHANGELOG.md)
- [Commits](https://github.com/n8n-io/n8n/compare/n8n@1.14.1...n8n@1.81.0)

Updates `semver` from 5.3.0 to 7.7.1
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v5.3.0...v7.7.1)

---
updated-dependencies:
- dependency-name: "@azure/identity"
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: n8n-core
  dependency-type: direct:production
  dependency-group: npm_and_yarn
- dependency-name: semver
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-07 10:23:53 +00:00
5 changed files with 1177 additions and 7729 deletions

View file

@ -1,6 +1,6 @@
# n8n-nodes-tavilyapi
# n8n-tavily-nodes
**n8n-nodes-tavilyapi** is an n8n community node package that integrates the [Tavily API](https://api.tavily.com) for powerful **web search** and **content extraction**.
**n8n-tavily-nodes** is an n8n community node package that integrates the [Tavily API](https://api.tavily.com) for powerful **web search** and **content extraction**.
It contains two nodes:
@ -51,7 +51,7 @@ It contains two nodes:
1. From your n8n root directory, run:
```bash
npm install n8n-nodes-tavilyapi
npm install n8n-tavily-nodes
```
2. Restart n8n.

8849
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -1,12 +1,12 @@
{
"name": "n8n-nodes-tavilyapi",
"version": "1.0.5",
"name": "n8n-tavily-nodes",
"version": "1.0.0",
"description": "n8n Community Nodes for Tavily API integration",
"author": "Steven Milanese <dev@levelai.xyz> (https://StevenMilanese.com)",
"license": "MIT",
"main": "dist/index.js",
"scripts": {
"build": "tsc && node copy-assets.js",
"build": "tsc",
"prepublishOnly": "npm run build"
},
"keywords": [

View file

@ -6,9 +6,11 @@ import {
INodeTypeDescription,
INodeProperties,
} from 'n8n-workflow';
// REMOVED import { IExecuteFunctions } from 'n8n-core';
import { tavilyApiRequest } from './tavilyApi.utils';
// For older n8n usage, ALLOWED_TIME_RANGES is fine here
const ALLOWED_TIME_RANGES = ['', 'day', 'week', 'month', 'year', 'd', 'w', 'm', 'y'];
export class TavilySearch implements INodeType {
@ -215,15 +217,11 @@ export class TavilySearch implements INodeType {
const searchDepth = this.getNodeParameter('searchDepth', i) as string;
const maxResults = this.getNodeParameter('maxResults', i) as number;
const timeRange = this.getNodeParameter('timeRange', i) as string;
const days = this.getNodeParameter('days', i) as number;
const includeAnswer = this.getNodeParameter('includeAnswer', i) as string;
const includeRawContent = this.getNodeParameter('includeRawContent', i) as boolean;
const includeImages = this.getNodeParameter('includeImages', i) as boolean;
let includeImageDescriptions = false;
if (includeImages) {
includeImageDescriptions = this.getNodeParameter('includeImageDescriptions', i) as boolean;
}
const includeImageDescriptions = this.getNodeParameter('includeImageDescriptions', i) as boolean;
const includeDomains = this.getNodeParameter('includeDomains', i, []) as string[];
const excludeDomains = this.getNodeParameter('excludeDomains', i, []) as string[];
@ -239,6 +237,9 @@ export class TavilySearch implements INodeType {
message: `Invalid timeRange value. Allowed: ${ALLOWED_TIME_RANGES.join(', ')}`,
});
}
if (topic === 'news' && days < 0) {
throw new NodeApiError(this.getNode(), { message: 'Days must be >= 0 when topic is "news".' });
}
const body: Record<string, any> = {
query,
@ -253,16 +254,9 @@ export class TavilySearch implements INodeType {
if (timeRange) {
body.time_range = timeRange;
}
// Only get and add days parameter when topic is news
if (topic === 'news') {
const days = this.getNodeParameter('days', i) as number;
if (days < 0) {
throw new NodeApiError(this.getNode(), { message: 'Days must be >= 0 when topic is "news".' });
}
body.days = days;
}
if (includeAnswer !== 'false') {
body.include_answer = includeAnswer;
}
@ -292,4 +286,4 @@ export class TavilySearch implements INodeType {
return [returnData];
}
}
}

View file

@ -1,23 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<!-- Background -->
<circle cx="12" cy="12" r="11" fill="#ffffff" stroke="#4a86e8" stroke-width="1" />
<!-- Magnifying glass with light fill -->
<circle cx="10" cy="10" r="4.5" fill="#e6f0ff" stroke="#4a86e8" stroke-width="1.8" />
<line x1="13" y1="13" x2="18" y2="18" stroke="#4a86e8" stroke-width="1.8" stroke-linecap="round" />
<!-- Small document icons representing search results -->
<rect x="14" y="8" width="4" height="5" rx="0.7" fill="#e6f0ff" stroke="#4a86e8" stroke-width="0.8" />
<rect x="7" y="15" width="4" height="5" rx="0.7" fill="#e6f0ff" stroke="#4a86e8" stroke-width="0.8" />
<rect x="13" y="15" width="4" height="5" rx="0.7" fill="#e6f0ff" stroke="#4a86e8" stroke-width="0.8" />
<!-- Simple text lines inside documents -->
<line x1="15" y1="9.5" x2="17" y2="9.5" stroke="#4a86e8" stroke-width="0.7" />
<line x1="15" y1="11" x2="17" y2="11" stroke="#4a86e8" stroke-width="0.7" />
<line x1="8" y1="16.5" x2="10" y2="16.5" stroke="#4a86e8" stroke-width="0.7" />
<line x1="8" y1="18" x2="10" y2="18" stroke="#4a86e8" stroke-width="0.7" />
<line x1="14" y1="16.5" x2="16" y2="16.5" stroke="#4a86e8" stroke-width="0.7" />
<line x1="14" y1="18" x2="16" y2="18" stroke="#4a86e8" stroke-width="0.7" />
</svg>

Before

Width:  |  Height:  |  Size: 1.3 KiB