n8n-nodes-crawl4ai-plus 2.0.0

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.
Files changed (74) hide show
  1. package/LICENSE +23 -0
  2. package/LICENSE.md +19 -0
  3. package/README.md +157 -0
  4. package/dist/credentials/Crawl4aiApi.credentials.d.ts +7 -0
  5. package/dist/credentials/Crawl4aiApi.credentials.js +242 -0
  6. package/dist/credentials/Crawl4aiApi.credentials.js.map +1 -0
  7. package/dist/nodes/Crawl4aiBasicCrawler/Crawl4aiBasicCrawler.node.d.ts +5 -0
  8. package/dist/nodes/Crawl4aiBasicCrawler/Crawl4aiBasicCrawler.node.js +37 -0
  9. package/dist/nodes/Crawl4aiBasicCrawler/Crawl4aiBasicCrawler.node.js.map +1 -0
  10. package/dist/nodes/Crawl4aiBasicCrawler/actions/crawlMultipleUrls.operation.d.ts +4 -0
  11. package/dist/nodes/Crawl4aiBasicCrawler/actions/crawlMultipleUrls.operation.js +299 -0
  12. package/dist/nodes/Crawl4aiBasicCrawler/actions/crawlMultipleUrls.operation.js.map +1 -0
  13. package/dist/nodes/Crawl4aiBasicCrawler/actions/crawlSingleUrl.operation.d.ts +4 -0
  14. package/dist/nodes/Crawl4aiBasicCrawler/actions/crawlSingleUrl.operation.js +324 -0
  15. package/dist/nodes/Crawl4aiBasicCrawler/actions/crawlSingleUrl.operation.js.map +1 -0
  16. package/dist/nodes/Crawl4aiBasicCrawler/actions/operations.d.ts +8 -0
  17. package/dist/nodes/Crawl4aiBasicCrawler/actions/operations.js +67 -0
  18. package/dist/nodes/Crawl4aiBasicCrawler/actions/operations.js.map +1 -0
  19. package/dist/nodes/Crawl4aiBasicCrawler/actions/processRawHtml.operation.d.ts +4 -0
  20. package/dist/nodes/Crawl4aiBasicCrawler/actions/processRawHtml.operation.js +148 -0
  21. package/dist/nodes/Crawl4aiBasicCrawler/actions/processRawHtml.operation.js.map +1 -0
  22. package/dist/nodes/Crawl4aiBasicCrawler/actions/router.d.ts +2 -0
  23. package/dist/nodes/Crawl4aiBasicCrawler/actions/router.js +37 -0
  24. package/dist/nodes/Crawl4aiBasicCrawler/actions/router.js.map +1 -0
  25. package/dist/nodes/Crawl4aiBasicCrawler/crawl4ai.svg +17 -0
  26. package/dist/nodes/Crawl4aiBasicCrawler/helpers/apiClient.d.ts +15 -0
  27. package/dist/nodes/Crawl4aiBasicCrawler/helpers/apiClient.js +226 -0
  28. package/dist/nodes/Crawl4aiBasicCrawler/helpers/apiClient.js.map +1 -0
  29. package/dist/nodes/Crawl4aiBasicCrawler/helpers/formatters.d.ts +5 -0
  30. package/dist/nodes/Crawl4aiBasicCrawler/helpers/formatters.js +81 -0
  31. package/dist/nodes/Crawl4aiBasicCrawler/helpers/formatters.js.map +1 -0
  32. package/dist/nodes/Crawl4aiBasicCrawler/helpers/interfaces.d.ts +189 -0
  33. package/dist/nodes/Crawl4aiBasicCrawler/helpers/interfaces.js +3 -0
  34. package/dist/nodes/Crawl4aiBasicCrawler/helpers/interfaces.js.map +1 -0
  35. package/dist/nodes/Crawl4aiBasicCrawler/helpers/utils.d.ts +8 -0
  36. package/dist/nodes/Crawl4aiBasicCrawler/helpers/utils.js +97 -0
  37. package/dist/nodes/Crawl4aiBasicCrawler/helpers/utils.js.map +1 -0
  38. package/dist/nodes/Crawl4aiContentExtractor/Crawl4aiContentExtractor.node.d.ts +5 -0
  39. package/dist/nodes/Crawl4aiContentExtractor/Crawl4aiContentExtractor.node.js +38 -0
  40. package/dist/nodes/Crawl4aiContentExtractor/Crawl4aiContentExtractor.node.js.map +1 -0
  41. package/dist/nodes/Crawl4aiContentExtractor/actions/cssExtractor.operation.d.ts +4 -0
  42. package/dist/nodes/Crawl4aiContentExtractor/actions/cssExtractor.operation.js +336 -0
  43. package/dist/nodes/Crawl4aiContentExtractor/actions/cssExtractor.operation.js.map +1 -0
  44. package/dist/nodes/Crawl4aiContentExtractor/actions/jsonExtractor.operation.d.ts +4 -0
  45. package/dist/nodes/Crawl4aiContentExtractor/actions/jsonExtractor.operation.js +369 -0
  46. package/dist/nodes/Crawl4aiContentExtractor/actions/jsonExtractor.operation.js.map +1 -0
  47. package/dist/nodes/Crawl4aiContentExtractor/actions/llmExtractor.operation.d.ts +4 -0
  48. package/dist/nodes/Crawl4aiContentExtractor/actions/llmExtractor.operation.js +786 -0
  49. package/dist/nodes/Crawl4aiContentExtractor/actions/llmExtractor.operation.js.map +1 -0
  50. package/dist/nodes/Crawl4aiContentExtractor/actions/operations.d.ts +8 -0
  51. package/dist/nodes/Crawl4aiContentExtractor/actions/operations.js +76 -0
  52. package/dist/nodes/Crawl4aiContentExtractor/actions/operations.js.map +1 -0
  53. package/dist/nodes/Crawl4aiContentExtractor/actions/regexExtractor.operation.d.ts +4 -0
  54. package/dist/nodes/Crawl4aiContentExtractor/actions/regexExtractor.operation.js +437 -0
  55. package/dist/nodes/Crawl4aiContentExtractor/actions/regexExtractor.operation.js.map +1 -0
  56. package/dist/nodes/Crawl4aiContentExtractor/actions/router.d.ts +2 -0
  57. package/dist/nodes/Crawl4aiContentExtractor/actions/router.js +37 -0
  58. package/dist/nodes/Crawl4aiContentExtractor/actions/router.js.map +1 -0
  59. package/dist/nodes/Crawl4aiContentExtractor/crawl4ai.svg +17 -0
  60. package/dist/nodes/Crawl4aiContentExtractor/helpers/apiClient.d.ts +1 -0
  61. package/dist/nodes/Crawl4aiContentExtractor/helpers/apiClient.js +7 -0
  62. package/dist/nodes/Crawl4aiContentExtractor/helpers/apiClient.js.map +1 -0
  63. package/dist/nodes/Crawl4aiContentExtractor/helpers/formatters.d.ts +1 -0
  64. package/dist/nodes/Crawl4aiContentExtractor/helpers/formatters.js +8 -0
  65. package/dist/nodes/Crawl4aiContentExtractor/helpers/formatters.js.map +1 -0
  66. package/dist/nodes/Crawl4aiContentExtractor/helpers/interfaces.d.ts +1 -0
  67. package/dist/nodes/Crawl4aiContentExtractor/helpers/interfaces.js +3 -0
  68. package/dist/nodes/Crawl4aiContentExtractor/helpers/interfaces.js.map +1 -0
  69. package/dist/nodes/Crawl4aiContentExtractor/helpers/utils.d.ts +6 -0
  70. package/dist/nodes/Crawl4aiContentExtractor/helpers/utils.js +89 -0
  71. package/dist/nodes/Crawl4aiContentExtractor/helpers/utils.js.map +1 -0
  72. package/dist/tsconfig.tsbuildinfo +1 -0
  73. package/index.js +14 -0
  74. package/package.json +70 -0
@@ -0,0 +1,189 @@
1
+ import { IDataObject } from 'n8n-workflow';
2
+ export interface Crawl4aiApiCredentials {
3
+ connectionMode: 'direct' | 'docker';
4
+ dockerUrl?: string;
5
+ authenticationType?: 'none' | 'token' | 'basic';
6
+ apiToken?: string;
7
+ username?: string;
8
+ password?: string;
9
+ enableLlm?: boolean;
10
+ llmProvider?: string;
11
+ apiKey?: string;
12
+ ollamaUrl?: string;
13
+ customProvider?: string;
14
+ customBaseUrl?: string;
15
+ customApiKey?: string;
16
+ cacheDir?: string;
17
+ }
18
+ export interface Crawl4aiNodeOptions extends IDataObject {
19
+ bypassCache?: boolean;
20
+ includeMedia?: boolean;
21
+ verboseResponse?: boolean;
22
+ cacheMode?: 'enabled' | 'bypass' | 'only';
23
+ }
24
+ export interface BrowserConfig {
25
+ browser_type?: string;
26
+ headless?: boolean;
27
+ browser_mode?: string;
28
+ use_managed_browser?: boolean;
29
+ cdp_url?: string;
30
+ debugging_port?: number;
31
+ use_persistent_context?: boolean;
32
+ user_data_dir?: string;
33
+ chrome_channel?: string;
34
+ channel?: string;
35
+ proxy?: string;
36
+ viewport_width?: number;
37
+ viewport_height?: number;
38
+ viewport?: {
39
+ width: number;
40
+ height: number;
41
+ };
42
+ accept_downloads?: boolean;
43
+ downloads_path?: string;
44
+ storage_state?: string | object;
45
+ ignore_https_errors?: boolean;
46
+ java_script_enabled?: boolean;
47
+ javaScriptEnabled?: boolean;
48
+ cookies?: Array<object>;
49
+ headers?: object;
50
+ user_agent?: string;
51
+ userAgent?: string;
52
+ user_agent_mode?: string;
53
+ user_agent_generator_config?: object;
54
+ text_mode?: boolean;
55
+ light_mode?: boolean;
56
+ extra_args?: Array<string>;
57
+ host?: string;
58
+ enable_stealth?: boolean;
59
+ }
60
+ export interface CrawlerRunConfig {
61
+ cacheMode?: 'enabled' | 'bypass' | 'only';
62
+ streamEnabled?: boolean;
63
+ pageTimeout?: number;
64
+ requestTimeout?: number;
65
+ timeout?: number;
66
+ waitUntil?: string;
67
+ waitFor?: string;
68
+ waitForTimeout?: number;
69
+ waitForImages?: boolean;
70
+ delayBeforeReturnHtml?: number;
71
+ jsCode?: string | string[];
72
+ jsOnly?: boolean;
73
+ ignoreBodyVisibility?: boolean;
74
+ scanFullPage?: boolean;
75
+ scrollDelay?: number;
76
+ maxScrollSteps?: number;
77
+ processIframes?: boolean;
78
+ removeOverlayElements?: boolean;
79
+ simulateUser?: boolean;
80
+ overrideNavigator?: boolean;
81
+ magic?: boolean;
82
+ adjustViewportToContent?: boolean;
83
+ cssSelector?: string;
84
+ targetElements?: string[];
85
+ excludedTags?: string[];
86
+ excludedSelector?: string;
87
+ keepDataAttributes?: boolean;
88
+ keepAttrs?: string[];
89
+ removeForms?: boolean;
90
+ onlyText?: boolean;
91
+ wordCountThreshold?: number;
92
+ excludeExternalLinks?: boolean;
93
+ excludeInternalLinks?: boolean;
94
+ excludeSocialMediaLinks?: boolean;
95
+ excludeDomains?: string[];
96
+ scoreLinks?: boolean;
97
+ screenshot?: boolean;
98
+ screenshotWaitFor?: number;
99
+ screenshotHeightThreshold?: number;
100
+ pdf?: boolean;
101
+ imageDescriptionMinWordThreshold?: number;
102
+ imageScoreThreshold?: number;
103
+ excludeExternalImages?: boolean;
104
+ excludeAllImages?: boolean;
105
+ tableScoreThreshold?: number;
106
+ checkRobotsTxt?: boolean;
107
+ userAgent?: string;
108
+ userAgentMode?: string;
109
+ userAgentGeneratorConfig?: object;
110
+ method?: string;
111
+ sessionId?: string;
112
+ sharedData?: object;
113
+ maxRetries?: number;
114
+ viewport?: {
115
+ width: number;
116
+ height: number;
117
+ };
118
+ headless?: boolean;
119
+ javaScriptEnabled?: boolean;
120
+ verbose?: boolean;
121
+ logConsole?: boolean;
122
+ captureNetworkRequests?: boolean;
123
+ captureConsoleMessages?: boolean;
124
+ extractionStrategy?: any;
125
+ chunkingStrategy?: any;
126
+ markdownGenerator?: any;
127
+ scrapingStrategy?: any;
128
+ proxyConfig?: object;
129
+ linkPreviewConfig?: object;
130
+ virtualScrollConfig?: object;
131
+ deepCrawlStrategy?: object;
132
+ experimental?: object;
133
+ }
134
+ export interface CrawlResult {
135
+ url: string;
136
+ success: boolean;
137
+ statusCode?: number;
138
+ status_code?: number;
139
+ title?: string;
140
+ markdown?: string;
141
+ html?: string;
142
+ cleaned_html?: string;
143
+ text?: string;
144
+ links?: {
145
+ internal: Link[];
146
+ external: Link[];
147
+ };
148
+ media?: {
149
+ images: Media[];
150
+ videos: Media[];
151
+ };
152
+ extracted_content?: string;
153
+ error_message?: string;
154
+ crawl_time?: number;
155
+ metadata?: Record<string, any>;
156
+ }
157
+ export interface Link {
158
+ href: string;
159
+ text: string;
160
+ title?: string;
161
+ }
162
+ export interface Media {
163
+ src: string;
164
+ alt?: string;
165
+ title?: string;
166
+ type?: string;
167
+ }
168
+ export interface CssSelectorField {
169
+ name: string;
170
+ selector: string;
171
+ type: 'text' | 'attribute' | 'html';
172
+ attribute?: string;
173
+ }
174
+ export interface CssSelectorSchema {
175
+ name: string;
176
+ baseSelector: string;
177
+ fields: CssSelectorField[];
178
+ }
179
+ export interface LlmSchemaField {
180
+ name: string;
181
+ type: string;
182
+ description?: string;
183
+ }
184
+ export interface LlmSchema {
185
+ title?: string;
186
+ type: 'object';
187
+ properties: Record<string, LlmSchemaField>;
188
+ required?: string[];
189
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=interfaces.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../../nodes/Crawl4aiBasicCrawler/helpers/interfaces.ts"],"names":[],"mappings":""}
@@ -0,0 +1,8 @@
1
+ import { IExecuteFunctions, IDataObject } from 'n8n-workflow';
2
+ import { BrowserConfig, CrawlerRunConfig } from './interfaces';
3
+ export declare function getCrawl4aiClient(executeFunctions: IExecuteFunctions): Promise<any>;
4
+ export declare function createBrowserConfig(options: IDataObject): BrowserConfig;
5
+ export declare function createCrawlerRunConfig(options: IDataObject): CrawlerRunConfig;
6
+ export declare function safeJsonParse(jsonString: string, defaultValue?: any): any;
7
+ export declare function cleanText(text: string): string;
8
+ export declare function isValidUrl(url: string): boolean;
@@ -0,0 +1,97 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getCrawl4aiClient = getCrawl4aiClient;
4
+ exports.createBrowserConfig = createBrowserConfig;
5
+ exports.createCrawlerRunConfig = createCrawlerRunConfig;
6
+ exports.safeJsonParse = safeJsonParse;
7
+ exports.cleanText = cleanText;
8
+ exports.isValidUrl = isValidUrl;
9
+ const apiClient_1 = require("./apiClient");
10
+ async function getCrawl4aiClient(executeFunctions) {
11
+ const credentials = await executeFunctions.getCredentials('crawl4aiApi');
12
+ if (!credentials) {
13
+ throw new Error('Crawl4AI credentials are not configured!');
14
+ }
15
+ return (0, apiClient_1.createCrawlerInstance)(credentials);
16
+ }
17
+ function createBrowserConfig(options) {
18
+ const config = {
19
+ browser_type: options.browserType ? String(options.browserType) : 'chromium',
20
+ headless: options.headless !== false,
21
+ browser_mode: options.browserMode ? String(options.browserMode) : 'dedicated',
22
+ use_managed_browser: options.useManagedBrowser === true,
23
+ debugging_port: options.debuggingPort ? Number(options.debuggingPort) : 9222,
24
+ chrome_channel: options.chromeChannel ? String(options.chromeChannel) : 'chromium',
25
+ channel: options.channel ? String(options.channel) : 'chromium',
26
+ viewport_width: options.viewportWidth ? Number(options.viewportWidth) : 1080,
27
+ viewport_height: options.viewportHeight ? Number(options.viewportHeight) : 600,
28
+ java_script_enabled: options.javaScriptEnabled !== false,
29
+ user_agent: options.userAgent ? String(options.userAgent) : "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 Chrome/116.0.0.0 Safari/537.36",
30
+ ignore_https_errors: options.ignoreHttpsErrors !== false,
31
+ cookies: options.cookies ? Array.isArray(options.cookies) ? options.cookies : [] : [],
32
+ headers: options.headers ? (typeof options.headers === 'object' ? options.headers : {}) : {},
33
+ text_mode: options.textMode === true,
34
+ light_mode: options.lightMode === true,
35
+ extra_args: options.extraArgs ? Array.isArray(options.extraArgs) ? options.extraArgs : [] : [],
36
+ enable_stealth: options.enableStealth === true,
37
+ };
38
+ config.viewport = {
39
+ width: config.viewport_width || 1080,
40
+ height: config.viewport_height || 600,
41
+ };
42
+ config.javaScriptEnabled = config.java_script_enabled;
43
+ config.userAgent = config.user_agent;
44
+ return config;
45
+ }
46
+ function createCrawlerRunConfig(options) {
47
+ let excludedTags = [];
48
+ if (options.excludedTags) {
49
+ if (typeof options.excludedTags === 'string') {
50
+ excludedTags = options.excludedTags
51
+ .split(',')
52
+ .map(tag => tag.trim())
53
+ .filter(tag => tag);
54
+ }
55
+ else if (Array.isArray(options.excludedTags)) {
56
+ excludedTags = options.excludedTags;
57
+ }
58
+ }
59
+ return {
60
+ cacheMode: options.cacheMode || 'enabled',
61
+ streamEnabled: options.streamEnabled === true,
62
+ pageTimeout: options.pageTimeout ? Number(options.pageTimeout) : 30000,
63
+ requestTimeout: options.requestTimeout ? Number(options.requestTimeout) : 30000,
64
+ jsCode: options.jsCode ? String(options.jsCode) : undefined,
65
+ jsOnly: options.jsOnly === true,
66
+ cssSelector: options.cssSelector ? String(options.cssSelector) : undefined,
67
+ excludedTags,
68
+ excludeExternalLinks: options.excludeExternalLinks === true,
69
+ checkRobotsTxt: options.checkRobotsTxt === true,
70
+ wordCountThreshold: options.wordCountThreshold ? Number(options.wordCountThreshold) : 0,
71
+ sessionId: options.sessionId ? String(options.sessionId) : undefined,
72
+ maxRetries: options.maxRetries ? Number(options.maxRetries) : 3,
73
+ };
74
+ }
75
+ function safeJsonParse(jsonString, defaultValue = null) {
76
+ try {
77
+ return JSON.parse(jsonString);
78
+ }
79
+ catch (error) {
80
+ return defaultValue;
81
+ }
82
+ }
83
+ function cleanText(text) {
84
+ return text
85
+ .replace(/\s+/g, ' ')
86
+ .trim();
87
+ }
88
+ function isValidUrl(url) {
89
+ try {
90
+ new URL(url);
91
+ return true;
92
+ }
93
+ catch (error) {
94
+ return false;
95
+ }
96
+ }
97
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../nodes/Crawl4aiBasicCrawler/helpers/utils.ts"],"names":[],"mappings":";;AAOA,8CAYC;AAOD,kDAiCC;AAOD,wDA6BC;AAKD,sCAMC;AAKD,8BAIC;AAKD,gCAOC;AA7HD,2CAAoD;AAK7C,KAAK,UAAU,iBAAiB,CACrC,gBAAmC;IAGnC,MAAM,WAAW,GAAG,MAAM,gBAAgB,CAAC,cAAc,CAAC,aAAa,CAAsC,CAAC;IAE9G,IAAI,CAAC,WAAW,EAAE,CAAC;QACjB,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAC;IAC9D,CAAC;IAGD,OAAO,IAAA,iCAAqB,EAAC,WAAW,CAAC,CAAC;AAC5C,CAAC;AAOD,SAAgB,mBAAmB,CAAC,OAAoB;IACtD,MAAM,MAAM,GAAkB;QAC5B,YAAY,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,UAAU;QAC5E,QAAQ,EAAE,OAAO,CAAC,QAAQ,KAAK,KAAK;QACpC,YAAY,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,WAAW;QAC7E,mBAAmB,EAAE,OAAO,CAAC,iBAAiB,KAAK,IAAI;QACvD,cAAc,EAAE,OAAO,CAAC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AC,MAAM,EAAE,GAAG,CAAC;SACpB,IAAI,EAAE,CAAC;AACZ,CAAC;AAKD,SAAgB,UAAU,CAAC,GAAW;IACpC,IAAI,CAAC;QACH,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC;QACb,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
2
+ export declare class Crawl4aiContentExtractor implements INodeType {
3
+ description: INodeTypeDescription;
4
+ execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
5
+ }
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Crawl4aiContentExtractor = void 0;
4
+ const router_1 = require("./actions/router");
5
+ const operations_1 = require("./actions/operations");
6
+ class Crawl4aiContentExtractor {
7
+ constructor() {
8
+ this.description = {
9
+ displayName: 'Crawl4AI: Content Extractor',
10
+ name: 'crawl4aiContentExtractor',
11
+ icon: 'file:crawl4ai.svg',
12
+ group: ['transform'],
13
+ version: 1,
14
+ subtitle: '={{$parameter["operation"]}}',
15
+ description: 'Extract structured content from web pages using Crawl4AI',
16
+ defaults: {
17
+ name: 'Crawl4AI: Content Extractor',
18
+ },
19
+ inputs: ['main'],
20
+ outputs: ['main'],
21
+ usableAsTool: true,
22
+ credentials: [
23
+ {
24
+ name: 'crawl4aiApi',
25
+ required: true,
26
+ },
27
+ ],
28
+ properties: [
29
+ ...operations_1.description,
30
+ ],
31
+ };
32
+ }
33
+ async execute() {
34
+ return await router_1.router.call(this);
35
+ }
36
+ }
37
+ exports.Crawl4aiContentExtractor = Crawl4aiContentExtractor;
38
+ //# sourceMappingURL=Crawl4aiContentExtractor.node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Crawl4aiContentExtractor.node.js","sourceRoot":"","sources":["../../../nodes/Crawl4aiContentExtractor/Crawl4aiContentExtractor.node.ts"],"names":[],"mappings":";;;AAQA,6CAA0C;AAC1C,qDAA4E;AAG5E,MAAa,wBAAwB;IAArC;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,6BAA6B;YAC1C,IAAI,EAAE,0BAA0B;YAChC,IAAI,EAAE,mBAAmB;YACzB,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,QAAQ,EAAE,8BAA8B;YACxC,WAAW,EAAE,0DAA0D;YACvE,QAAQ,EAAE;gBACT,IAAI,EAAE,6BAA6B;aACnC;YACD,MAAM,EAAE,CAAC,MAAM,CAAC;YAChB,OAAO,EAAE,CAAC,MAAM,CAAC;YACjB,YAAY,EAAE,IAAI;YAClB,WAAW,EAAE;gBACZ;oBACC,IAAI,EAAE,aAAa;oBACnB,QAAQ,EAAE,IAAI;iBACd;aACD;YACD,UAAU,EAAE;gBACX,GAAG,wBAAqB;aACxB;SACD,CAAC;IAMH,CAAC;IAHA,KAAK,CAAC,OAAO;QACZ,OAAO,MAAM,eAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAChC,CAAC;CACD;AA9BD,4DA8BC"}
@@ -0,0 +1,4 @@
1
+ import type { IExecuteFunctions, INodeExecutionData, INodeProperties } from 'n8n-workflow';
2
+ import type { Crawl4aiNodeOptions } from '../helpers/interfaces';
3
+ export declare const description: INodeProperties[];
4
+ export declare function execute(this: IExecuteFunctions, items: INodeExecutionData[], nodeOptions: Crawl4aiNodeOptions): Promise<INodeExecutionData[]>;