n8n-nodes-redlib 0.1.1 → 1.0.1
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/README.md +101 -201
- package/dist/credentials/RedlibApi.credentials.d.ts +10 -0
- package/dist/credentials/RedlibApi.credentials.js +80 -0
- package/dist/credentials/RedlibApi.credentials.js.map +1 -0
- package/dist/icons/redlib.dark.svg +11 -0
- package/dist/icons/redlib.svg +11 -0
- package/dist/nodes/Redlib/Redlib.node.d.ts +6 -0
- package/dist/nodes/Redlib/Redlib.node.js +404 -0
- package/dist/nodes/Redlib/Redlib.node.js.map +1 -0
- package/dist/nodes/Redlib/Redlib.node.json +18 -0
- package/dist/nodes/Redlib/resources/post/get.d.ts +2 -0
- package/dist/nodes/Redlib/resources/post/get.js +31 -0
- package/dist/nodes/Redlib/resources/post/get.js.map +1 -0
- package/dist/nodes/Redlib/resources/post/getAll.d.ts +2 -0
- package/dist/nodes/Redlib/resources/post/getAll.js +60 -0
- package/dist/nodes/Redlib/resources/post/getAll.js.map +1 -0
- package/dist/nodes/Redlib/resources/post/search.d.ts +2 -0
- package/dist/nodes/Redlib/resources/post/search.js +113 -0
- package/dist/nodes/Redlib/resources/post/search.js.map +1 -0
- package/dist/nodes/Redlib/resources/postComment/get.d.ts +2 -0
- package/dist/nodes/Redlib/resources/postComment/get.js +44 -0
- package/dist/nodes/Redlib/resources/postComment/get.js.map +1 -0
- package/dist/nodes/Redlib/resources/postComment/getAll.d.ts +2 -0
- package/dist/nodes/Redlib/resources/postComment/getAll.js +44 -0
- package/dist/nodes/Redlib/resources/postComment/getAll.js.map +1 -0
- package/dist/nodes/Redlib/resources/postComment/search.d.ts +2 -0
- package/dist/nodes/Redlib/resources/postComment/search.js +44 -0
- package/dist/nodes/Redlib/resources/postComment/search.js.map +1 -0
- package/dist/nodes/Redlib/resources/subreddit/get.d.ts +2 -0
- package/dist/nodes/Redlib/resources/subreddit/get.js +19 -0
- package/dist/nodes/Redlib/resources/subreddit/get.js.map +1 -0
- package/dist/nodes/Redlib/resources/subreddit/getAll.d.ts +2 -0
- package/dist/nodes/Redlib/resources/subreddit/getAll.js +29 -0
- package/dist/nodes/Redlib/resources/subreddit/getAll.js.map +1 -0
- package/dist/nodes/Redlib/resources/subreddit/search.d.ts +2 -0
- package/dist/nodes/Redlib/resources/subreddit/search.js +32 -0
- package/dist/nodes/Redlib/resources/subreddit/search.js.map +1 -0
- package/dist/nodes/Redlib/shared/utils.d.ts +85 -0
- package/dist/nodes/Redlib/shared/utils.js +313 -0
- package/dist/nodes/Redlib/shared/utils.js.map +1 -0
- package/dist/package.json +8 -7
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +8 -7
- package/dist/credentials/GithubIssuesApi.credentials.d.ts +0 -10
- package/dist/credentials/GithubIssuesApi.credentials.js +0 -37
- package/dist/credentials/GithubIssuesApi.credentials.js.map +0 -1
- package/dist/credentials/GithubIssuesOAuth2Api.credentials.d.ts +0 -9
- package/dist/credentials/GithubIssuesOAuth2Api.credentials.js +0 -54
- package/dist/credentials/GithubIssuesOAuth2Api.credentials.js.map +0 -1
- package/dist/icons/github.dark.svg +0 -3
- package/dist/icons/github.svg +0 -3
- package/dist/nodes/Example/Example.node.d.ts +0 -5
- package/dist/nodes/Example/Example.node.js +0 -61
- package/dist/nodes/Example/Example.node.js.map +0 -1
- package/dist/nodes/Example/Example.node.json +0 -18
- package/dist/nodes/Example/example.dark.svg +0 -13
- package/dist/nodes/Example/example.svg +0 -13
- package/dist/nodes/GithubIssues/GithubIssues.node.d.ts +0 -14
- package/dist/nodes/GithubIssues/GithubIssues.node.js +0 -101
- package/dist/nodes/GithubIssues/GithubIssues.node.js.map +0 -1
- package/dist/nodes/GithubIssues/GithubIssues.node.json +0 -18
- package/dist/nodes/GithubIssues/listSearch/getIssues.d.ts +0 -2
- package/dist/nodes/GithubIssues/listSearch/getIssues.js +0 -28
- package/dist/nodes/GithubIssues/listSearch/getIssues.js.map +0 -1
- package/dist/nodes/GithubIssues/listSearch/getRepositories.d.ts +0 -2
- package/dist/nodes/GithubIssues/listSearch/getRepositories.js +0 -31
- package/dist/nodes/GithubIssues/listSearch/getRepositories.js.map +0 -1
- package/dist/nodes/GithubIssues/listSearch/getUsers.d.ts +0 -2
- package/dist/nodes/GithubIssues/listSearch/getUsers.js +0 -29
- package/dist/nodes/GithubIssues/listSearch/getUsers.js.map +0 -1
- package/dist/nodes/GithubIssues/resources/issue/create.d.ts +0 -2
- package/dist/nodes/GithubIssues/resources/issue/create.js +0 -75
- package/dist/nodes/GithubIssues/resources/issue/create.js.map +0 -1
- package/dist/nodes/GithubIssues/resources/issue/get.d.ts +0 -2
- package/dist/nodes/GithubIssues/resources/issue/get.js +0 -15
- package/dist/nodes/GithubIssues/resources/issue/get.js.map +0 -1
- package/dist/nodes/GithubIssues/resources/issue/getAll.d.ts +0 -2
- package/dist/nodes/GithubIssues/resources/issue/getAll.js +0 -125
- package/dist/nodes/GithubIssues/resources/issue/getAll.js.map +0 -1
- package/dist/nodes/GithubIssues/resources/issue/index.d.ts +0 -2
- package/dist/nodes/GithubIssues/resources/issue/index.js +0 -76
- package/dist/nodes/GithubIssues/resources/issue/index.js.map +0 -1
- package/dist/nodes/GithubIssues/resources/issueComment/getAll.d.ts +0 -2
- package/dist/nodes/GithubIssues/resources/issueComment/getAll.js +0 -66
- package/dist/nodes/GithubIssues/resources/issueComment/getAll.js.map +0 -1
- package/dist/nodes/GithubIssues/resources/issueComment/index.d.ts +0 -2
- package/dist/nodes/GithubIssues/resources/issueComment/index.js +0 -48
- package/dist/nodes/GithubIssues/resources/issueComment/index.js.map +0 -1
- package/dist/nodes/GithubIssues/shared/descriptions.d.ts +0 -4
- package/dist/nodes/GithubIssues/shared/descriptions.js +0 -151
- package/dist/nodes/GithubIssues/shared/descriptions.js.map +0 -1
- package/dist/nodes/GithubIssues/shared/transport.d.ts +0 -2
- package/dist/nodes/GithubIssues/shared/transport.js +0 -16
- package/dist/nodes/GithubIssues/shared/transport.js.map +0 -1
- package/dist/nodes/GithubIssues/shared/utils.d.ts +0 -3
- package/dist/nodes/GithubIssues/shared/utils.js +0 -17
- package/dist/nodes/GithubIssues/shared/utils.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,247 +1,147 @@
|
|
|
1
|
-

|
|
2
|
-
|
|
3
1
|
# n8n-nodes-redlib
|
|
4
2
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
## Quick Start
|
|
8
|
-
|
|
9
|
-
> [!TIP]
|
|
10
|
-
> **New to building n8n nodes?** The fastest way to get started is with `npm create @n8n/node`. This command scaffolds a complete node package for you using the [@n8n/node-cli](https://www.npmjs.com/package/@n8n/node-cli).
|
|
11
|
-
|
|
12
|
-
**To create a new node package from scratch:**
|
|
13
|
-
|
|
14
|
-
```bash
|
|
15
|
-
npm create @n8n/node
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
**Already using this starter? Start developing with:**
|
|
19
|
-
|
|
20
|
-
```bash
|
|
21
|
-
npm run dev
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
This starts n8n with your nodes loaded and hot reload enabled.
|
|
25
|
-
|
|
26
|
-
## What's Included
|
|
27
|
-
|
|
28
|
-
This starter repository includes two example nodes to learn from:
|
|
29
|
-
|
|
30
|
-
- **[Example Node](nodes/Example/)** - A simple starter node that shows the basic structure with a custom `execute` method
|
|
31
|
-
- **[GitHub Issues Node](nodes/GithubIssues/)** - A complete, production-ready example built using the **declarative style**:
|
|
32
|
-
- **Low-code approach** - Define operations declaratively without writing request logic
|
|
33
|
-
- Multiple resources (Issues, Comments)
|
|
34
|
-
- Multiple operations (Get, Get All, Create)
|
|
35
|
-
- Two authentication methods (OAuth2 and Personal Access Token)
|
|
36
|
-
- List search functionality for dynamic dropdowns
|
|
37
|
-
- Proper error handling and typing
|
|
38
|
-
- Ideal for HTTP API-based integrations
|
|
39
|
-
|
|
40
|
-
> [!TIP]
|
|
41
|
-
> The declarative/low-code style (used in GitHub Issues) is the recommended approach for building nodes that interact with HTTP APIs. It significantly reduces boilerplate code and handles requests automatically.
|
|
3
|
+
[n8n](https://n8n.io/) community node for fetching Reddit data through Redlib without OAuth authentication.
|
|
42
4
|
|
|
43
|
-
|
|
5
|
+
> **Disclaimer**: This project is not affiliated with, endorsed by, or connected to [Redlib](https://github.com/redlib-org/redlib) in any way. Redlib is a separate independent project. This node simply uses publicly accessible Redlib instances to fetch Reddit data.
|
|
44
6
|
|
|
45
|
-
##
|
|
7
|
+
## Why This Node?
|
|
46
8
|
|
|
47
|
-
|
|
9
|
+
In November 2025, Reddit introduced the [Responsible Builder Policy](https://www.reddit.com/r/redditdev/comments/1oug31u/introducing_the_responsible_builder_policy_new/), which significantly restricts the creation of new OAuth2 applications. Developers can no longer self-serve OAuth2 apps and must instead submit a support ticket with a low approval rate.
|
|
48
10
|
|
|
49
|
-
|
|
50
|
-
- **[n8n Built-in Nodes](https://github.com/n8n-io/n8n/tree/master/packages/nodes-base/nodes)** - Study the source code of n8n's official nodes for production-ready patterns and best practices
|
|
51
|
-
- **[n8n Credentials](https://github.com/n8n-io/n8n/tree/master/packages/nodes-base/credentials)** - See how authentication is implemented for various services
|
|
11
|
+
This node exists to help n8n users continue to fetch Reddit data for automation workflows without needing OAuth2 credentials. It uses [Redlib](https://github.com/redlib-org/redlib)—a private Reddit frontend—to scrape public Reddit data and return it in the same format as the Reddit API.
|
|
52
12
|
|
|
53
|
-
|
|
13
|
+
## What is Redlib?
|
|
54
14
|
|
|
55
|
-
|
|
15
|
+
Redlib is an alternative private front-end to Reddit. It provides a clean, privacy-focused interface for browsing Reddit without tracking. This node uses Redlib instances to fetch public Reddit data (posts, comments, subreddit information) and parses the HTML to return structured data compatible with the Reddit API format.
|
|
56
16
|
|
|
57
|
-
|
|
17
|
+
> **Note**: This project is independent from Redlib. For issues related to Redlib itself, please visit the [Redlib GitHub repository](https://github.com/redlib-org/redlib).
|
|
58
18
|
|
|
59
|
-
|
|
19
|
+
[Installation](#installation)
|
|
20
|
+
[Operations](#operations)
|
|
21
|
+
[Credentials](#credentials)
|
|
22
|
+
[Compatibility](#compatibility)
|
|
23
|
+
[Resources](#resources)
|
|
60
24
|
|
|
61
|
-
|
|
62
|
-
- Linux/Mac/WSL: Install via [nvm](https://github.com/nvm-sh/nvm)
|
|
63
|
-
- Windows: Follow [Microsoft's NodeJS guide](https://learn.microsoft.com/en-us/windows/dev-environment/javascript/nodejs-on-windows)
|
|
64
|
-
- **[git](https://git-scm.com/downloads)**
|
|
25
|
+
## Installation
|
|
65
26
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
- Follow n8n's [development environment setup guide](https://docs.n8n.io/integrations/creating-nodes/build/node-development-environment/)
|
|
69
|
-
|
|
70
|
-
> [!NOTE]
|
|
71
|
-
> The `@n8n/node-cli` is included as a dev dependency and will be installed automatically when you run `npm install`. The CLI includes n8n for local development, so you don't need to install n8n globally.
|
|
72
|
-
|
|
73
|
-
## Getting Started with this Starter
|
|
74
|
-
|
|
75
|
-
Follow these steps to create your own n8n community node package:
|
|
76
|
-
|
|
77
|
-
### 1. Create Your Repository
|
|
78
|
-
|
|
79
|
-
[Generate a new repository](https://github.com/n8n-io/n8n-nodes-starter/generate) from this template, then clone it:
|
|
27
|
+
Follow the [installation guide](https://docs.n8n.io/integrations/community-nodes/installation/) in the n8n community nodes documentation.
|
|
80
28
|
|
|
81
29
|
```bash
|
|
82
|
-
|
|
83
|
-
|
|
30
|
+
# In your n8n installation directory
|
|
31
|
+
npm install n8n-nodes-redlib
|
|
84
32
|
```
|
|
85
33
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
```bash
|
|
89
|
-
npm install
|
|
90
|
-
```
|
|
34
|
+
## Operations
|
|
91
35
|
|
|
92
|
-
|
|
36
|
+
### Post
|
|
93
37
|
|
|
94
|
-
|
|
38
|
+
| Operation | Description |
|
|
39
|
+
|-----------|-------------|
|
|
40
|
+
| **Search** | Search for posts in a subreddit by keyword |
|
|
41
|
+
| **Get** | Get a single post by ID |
|
|
42
|
+
| **Get Many** | Get multiple posts from a subreddit (hot/new/top/rising) |
|
|
95
43
|
|
|
96
|
-
|
|
44
|
+
### Post Comment
|
|
97
45
|
|
|
98
|
-
|
|
99
|
-
|
|
46
|
+
| Operation | Description |
|
|
47
|
+
|-----------|-------------|
|
|
48
|
+
| **Search** | Search for posts containing a keyword |
|
|
49
|
+
| **Get** | Get comments from a specific post |
|
|
50
|
+
| **Get Many** | Get comments from multiple posts |
|
|
100
51
|
|
|
101
|
-
###
|
|
52
|
+
### Subreddit
|
|
102
53
|
|
|
103
|
-
|
|
54
|
+
| Operation | Description |
|
|
55
|
+
|-----------|-------------|
|
|
56
|
+
| **Search** | Search for subreddits by keyword |
|
|
57
|
+
| **Get** | Get subreddit information |
|
|
58
|
+
| **Get Many** | Get multiple subreddits or trending subreddits |
|
|
104
59
|
|
|
105
|
-
|
|
106
|
-
> If you want to scaffold a completely new node package, use `npm create @n8n/node` to start fresh with the CLI's interactive generator.
|
|
60
|
+
## Credentials
|
|
107
61
|
|
|
108
|
-
|
|
62
|
+
**Redlib API** - Configure access to a Redlib instance.
|
|
109
63
|
|
|
110
|
-
|
|
64
|
+
| Property | Description |
|
|
65
|
+
|----------|-------------|
|
|
66
|
+
| **Instance URL** | URL of the Redlib instance to use (default: `https://redlib.catsarch.com`) |
|
|
67
|
+
| **Authentication** | None or Basic Auth (if your Redlib instance requires authentication) |
|
|
68
|
+
| **Username** | Username for Basic Auth (if required) |
|
|
69
|
+
| **Password** | Password for Basic Auth (if required) |
|
|
111
70
|
|
|
112
|
-
|
|
113
|
-
- `author` - Your name and email
|
|
114
|
-
- `repository` - Your repository URL
|
|
115
|
-
- `description` - What your node does
|
|
71
|
+
### Finding a Redlib Instance
|
|
116
72
|
|
|
117
|
-
|
|
73
|
+
You can use any public Redlib instance. A list of public instances is available at [redlibinstances.github.io](https://redlibinstances.github.io). Popular instances include:
|
|
118
74
|
|
|
119
|
-
|
|
75
|
+
- `https://redlib.catsarch.com`
|
|
76
|
+
- `https://redlib.privacydev.net`
|
|
77
|
+
- `https://redlib.nerdvpn.de`
|
|
120
78
|
|
|
121
|
-
|
|
79
|
+
> **Note**: Public instances may have rate limits. Consider hosting your own Redlib instance for production use.
|
|
122
80
|
|
|
123
|
-
|
|
124
|
-
npm run dev
|
|
125
|
-
```
|
|
81
|
+
## Compatibility
|
|
126
82
|
|
|
127
|
-
|
|
83
|
+
Minimum n8n version: **1.0.0**
|
|
128
84
|
|
|
129
|
-
|
|
130
|
-
- Starts n8n with your node available
|
|
131
|
-
- Automatically rebuilds when you make changes
|
|
132
|
-
- Opens n8n in your browser (usually http://localhost:5678)
|
|
85
|
+
Tested with n8n versions: **1.x**
|
|
133
86
|
|
|
134
|
-
|
|
87
|
+
## Usage
|
|
135
88
|
|
|
136
|
-
|
|
137
|
-
> Learn more about CLI commands in the [@n8n/node-cli documentation](https://www.npmjs.com/package/@n8n/node-cli).
|
|
89
|
+
### Example: Get Posts from a Subreddit
|
|
138
90
|
|
|
139
|
-
|
|
91
|
+
1. Add the **Redlib** node to your workflow
|
|
92
|
+
2. Select **Post** > **Get Many** operation
|
|
93
|
+
3. Enter subreddit name (e.g., `technology`)
|
|
94
|
+
4. Select category (hot, new, top, or rising)
|
|
95
|
+
5. Set the limit for number of results
|
|
140
96
|
|
|
141
|
-
|
|
97
|
+
### Example: Search for Posts
|
|
142
98
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
99
|
+
1. Add the **Redlib** node to your workflow
|
|
100
|
+
2. Select **Post** > **Search** operation
|
|
101
|
+
3. Enter subreddit name (e.g., `SaaS`)
|
|
102
|
+
4. Enter search keyword (e.g., `marketing`)
|
|
103
|
+
5. Sort by relevance, hot, top, or new
|
|
146
104
|
|
|
147
|
-
|
|
105
|
+
### Example: Get Comments from a Post
|
|
148
106
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
107
|
+
1. Add the **Redlib** node to your workflow
|
|
108
|
+
2. Select **Post Comment** > **Get** operation
|
|
109
|
+
3. Enter subreddit name (e.g., `technology`)
|
|
110
|
+
4. Enter post ID (e.g., `1pudg98`)
|
|
111
|
+
5. Set the limit for number of comments
|
|
152
112
|
|
|
153
|
-
###
|
|
113
|
+
### Output Format
|
|
154
114
|
|
|
155
|
-
|
|
115
|
+
The node returns data in the same format as the Reddit API:
|
|
156
116
|
|
|
157
|
-
```
|
|
158
|
-
|
|
117
|
+
```json
|
|
118
|
+
{
|
|
119
|
+
"kind": "Listing",
|
|
120
|
+
"data": {
|
|
121
|
+
"children": [
|
|
122
|
+
{
|
|
123
|
+
"kind": "t3",
|
|
124
|
+
"data": {
|
|
125
|
+
"id": "1pudg98",
|
|
126
|
+
"title": "Post title",
|
|
127
|
+
"author": "username",
|
|
128
|
+
"subreddit": "SaaS",
|
|
129
|
+
"selftext": "Post content",
|
|
130
|
+
"score": 74,
|
|
131
|
+
"num_comments": 52,
|
|
132
|
+
"created_utc": 1766547398.0,
|
|
133
|
+
"permalink": "/r/SaaS/comments/1pudg98/...",
|
|
134
|
+
"url": "https://www.reddit.com/..."
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
]
|
|
138
|
+
}
|
|
139
|
+
}
|
|
159
140
|
```
|
|
160
141
|
|
|
161
|
-
This compiles your TypeScript code to the `dist/` folder.
|
|
162
|
-
|
|
163
|
-
### 9. Prepare for Publishing
|
|
164
|
-
|
|
165
|
-
Before publishing:
|
|
166
|
-
|
|
167
|
-
1. **Update documentation**: Replace this README with your node's documentation. Use [README_TEMPLATE.md](README_TEMPLATE.md) as a starting point.
|
|
168
|
-
2. **Update the LICENSE**: Add your details to the [LICENSE](LICENSE.md) file.
|
|
169
|
-
3. **Test thoroughly**: Ensure your node works in different scenarios.
|
|
170
|
-
|
|
171
|
-
### 10. Publish to npm
|
|
172
|
-
|
|
173
|
-
Publish your package to make it available to the n8n community:
|
|
174
|
-
|
|
175
|
-
```bash
|
|
176
|
-
npm publish
|
|
177
|
-
```
|
|
178
|
-
|
|
179
|
-
Learn more about [publishing to npm](https://docs.npmjs.com/packages-and-modules/contributing-packages-to-the-registry).
|
|
180
|
-
|
|
181
|
-
### 11. Submit for Verification (Optional)
|
|
182
|
-
|
|
183
|
-
Get your node verified for n8n Cloud:
|
|
184
|
-
|
|
185
|
-
1. Ensure your node meets the [requirements](https://docs.n8n.io/integrations/creating-nodes/deploy/submit-community-nodes/):
|
|
186
|
-
- Uses MIT license ✅ (included in this starter)
|
|
187
|
-
- No external package dependencies
|
|
188
|
-
- Follows n8n's design guidelines
|
|
189
|
-
- Passes quality and security review
|
|
190
|
-
|
|
191
|
-
2. Submit through the [n8n Creator Portal](https://creators.n8n.io/nodes)
|
|
192
|
-
|
|
193
|
-
**Benefits of verification:**
|
|
194
|
-
|
|
195
|
-
- Available directly in n8n Cloud
|
|
196
|
-
- Discoverable in the n8n nodes panel
|
|
197
|
-
- Verified badge for quality assurance
|
|
198
|
-
- Increased visibility in the n8n community
|
|
199
|
-
|
|
200
|
-
## Available Scripts
|
|
201
|
-
|
|
202
|
-
This starter includes several npm scripts to streamline development:
|
|
203
|
-
|
|
204
|
-
| Script | Description |
|
|
205
|
-
| --------------------- | ---------------------------------------------------------------- |
|
|
206
|
-
| `npm run dev` | Start n8n with your node and watch for changes (runs `n8n-node dev`) |
|
|
207
|
-
| `npm run build` | Compile TypeScript to JavaScript for production (runs `n8n-node build`) |
|
|
208
|
-
| `npm run build:watch` | Build in watch mode (auto-rebuild on changes) |
|
|
209
|
-
| `npm run lint` | Check your code for errors and style issues (runs `n8n-node lint`) |
|
|
210
|
-
| `npm run lint:fix` | Automatically fix linting issues when possible (runs `n8n-node lint --fix`) |
|
|
211
|
-
| `npm run release` | Create a new release (runs `n8n-node release`) |
|
|
212
|
-
|
|
213
|
-
> [!TIP]
|
|
214
|
-
> These scripts use the [@n8n/node-cli](https://www.npmjs.com/package/@n8n/node-cli) under the hood. You can also run CLI commands directly, e.g., `npx n8n-node dev`.
|
|
215
|
-
|
|
216
|
-
## Troubleshooting
|
|
217
|
-
|
|
218
|
-
### My node doesn't appear in n8n
|
|
219
|
-
|
|
220
|
-
1. Make sure you ran `npm install` to install dependencies
|
|
221
|
-
2. Check that your node is listed in `package.json` under `n8n.nodes`
|
|
222
|
-
3. Restart the dev server with `npm run dev`
|
|
223
|
-
4. Check the console for any error messages
|
|
224
|
-
|
|
225
|
-
### Linting errors
|
|
226
|
-
|
|
227
|
-
Run `npm run lint:fix` to automatically fix most common issues. For remaining errors, check the [n8n node development guidelines](https://docs.n8n.io/integrations/creating-nodes/).
|
|
228
|
-
|
|
229
|
-
### TypeScript errors
|
|
230
|
-
|
|
231
|
-
Make sure you're using Node.js v22 or higher and have run `npm install` to get all type definitions.
|
|
232
|
-
|
|
233
142
|
## Resources
|
|
234
143
|
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
- **[Submit Community Nodes Guide](https://docs.n8n.io/integrations/creating-nodes/deploy/submit-community-nodes/)** - Verification requirements and process
|
|
240
|
-
|
|
241
|
-
## Contributing
|
|
242
|
-
|
|
243
|
-
Have suggestions for improving this starter? [Open an issue](https://github.com/n8n-io/n8n-nodes-starter/issues) or submit a pull request!
|
|
244
|
-
|
|
245
|
-
## License
|
|
246
|
-
|
|
247
|
-
[MIT](https://github.com/n8n-io/n8n-nodes-starter/blob/master/LICENSE.md)
|
|
144
|
+
* [n8n community nodes documentation](https://docs.n8n.io/integrations/#community-nodes)
|
|
145
|
+
* [Redlib GitHub Repository](https://github.com/redlib-org/redlib)
|
|
146
|
+
* [Public Redlib Instances](https://redlibinstances.github.io)
|
|
147
|
+
* [n8n Node Development Guide](https://docs.n8n.io/integrations/creating-nodes/)
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ICredentialType, INodeProperties, IAuthenticateGeneric, ICredentialTestRequest } from 'n8n-workflow';
|
|
2
|
+
export declare class RedlibApi implements ICredentialType {
|
|
3
|
+
name: string;
|
|
4
|
+
displayName: string;
|
|
5
|
+
documentationUrl: string;
|
|
6
|
+
testedBy: string;
|
|
7
|
+
properties: INodeProperties[];
|
|
8
|
+
authenticate: IAuthenticateGeneric;
|
|
9
|
+
test: ICredentialTestRequest;
|
|
10
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RedlibApi = void 0;
|
|
4
|
+
class RedlibApi {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.name = 'redlibApi';
|
|
7
|
+
this.displayName = 'Redlib API';
|
|
8
|
+
this.documentationUrl = 'https://github.com/yuangwei/n8n-nodes-redlib';
|
|
9
|
+
this.testedBy = 'redlib';
|
|
10
|
+
this.properties = [
|
|
11
|
+
{
|
|
12
|
+
displayName: 'Instance URL',
|
|
13
|
+
name: 'instanceUrl',
|
|
14
|
+
type: 'string',
|
|
15
|
+
default: 'https://redlib.catsarch.com',
|
|
16
|
+
required: true,
|
|
17
|
+
description: 'URL of the Redlib instance to use',
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
displayName: 'Authentication',
|
|
21
|
+
name: 'authType',
|
|
22
|
+
type: 'options',
|
|
23
|
+
options: [
|
|
24
|
+
{
|
|
25
|
+
name: 'None',
|
|
26
|
+
value: 'none',
|
|
27
|
+
description: 'No authentication required',
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
name: 'Basic Auth',
|
|
31
|
+
value: 'basicAuth',
|
|
32
|
+
description: 'Username and password authentication',
|
|
33
|
+
},
|
|
34
|
+
],
|
|
35
|
+
default: 'none',
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
displayName: 'Username',
|
|
39
|
+
name: 'username',
|
|
40
|
+
type: 'string',
|
|
41
|
+
displayOptions: {
|
|
42
|
+
show: {
|
|
43
|
+
authType: ['basicAuth'],
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
default: '',
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
displayName: 'Password',
|
|
50
|
+
name: 'password',
|
|
51
|
+
type: 'string',
|
|
52
|
+
typeOptions: {
|
|
53
|
+
password: true,
|
|
54
|
+
},
|
|
55
|
+
displayOptions: {
|
|
56
|
+
show: {
|
|
57
|
+
authType: ['basicAuth'],
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
default: '',
|
|
61
|
+
},
|
|
62
|
+
];
|
|
63
|
+
this.authenticate = {
|
|
64
|
+
type: 'generic',
|
|
65
|
+
properties: {
|
|
66
|
+
headers: {
|
|
67
|
+
'User-Agent': 'n8n-redlib-node/1.0',
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
};
|
|
71
|
+
this.test = {
|
|
72
|
+
request: {
|
|
73
|
+
baseURL: '={{$credentials.instanceUrl}}',
|
|
74
|
+
url: '/',
|
|
75
|
+
},
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
exports.RedlibApi = RedlibApi;
|
|
80
|
+
//# sourceMappingURL=RedlibApi.credentials.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RedlibApi.credentials.js","sourceRoot":"","sources":["../../credentials/RedlibApi.credentials.ts"],"names":[],"mappings":";;;AAQA,MAAa,SAAS;IAAtB;QACE,SAAI,GAAG,WAAW,CAAC;QACnB,gBAAW,GAAG,YAAY,CAAC;QAC3B,qBAAgB,GAAG,8CAA8C,CAAC;QAClE,aAAQ,GAAG,QAAQ,CAAC;QACpB,eAAU,GAAsB;YAC9B;gBACE,WAAW,EAAE,cAAc;gBAC3B,IAAI,EAAE,aAAa;gBACnB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,6BAA6B;gBACtC,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,mCAAmC;aACjD;YACD;gBACE,WAAW,EAAE,gBAAgB;gBAC7B,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,SAAS;gBACf,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAM;wBACZ,KAAK,EAAE,MAAM;wBACb,WAAW,EAAE,4BAA4B;qBAC1C;oBACD;wBACE,IAAI,EAAE,YAAY;wBAClB,KAAK,EAAE,WAAW;wBAClB,WAAW,EAAE,sCAAsC;qBACpD;iBACF;gBACD,OAAO,EAAE,MAAM;aAChB;YACD;gBACE,WAAW,EAAE,UAAU;gBACvB,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,QAAQ;gBACd,cAAc,EAAE;oBACd,IAAI,EAAE;wBACJ,QAAQ,EAAE,CAAC,WAAW,CAAC;qBACxB;iBACF;gBACD,OAAO,EAAE,EAAE;aACZ;YACD;gBACE,WAAW,EAAE,UAAU;gBACvB,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE;oBACX,QAAQ,EAAE,IAAI;iBACf;gBACD,cAAc,EAAE;oBACd,IAAI,EAAE;wBACJ,QAAQ,EAAE,CAAC,WAAW,CAAC;qBACxB;iBACF;gBACD,OAAO,EAAE,EAAE;aACZ;SACF,CAAC;QACF,iBAAY,GAAyB;YACnC,IAAI,EAAE,SAAS;YACf,UAAU,EAAE;gBACV,OAAO,EAAE;oBACP,YAAY,EAAE,qBAAqB;iBACpC;aACF;SACF,CAAC;QACF,SAAI,GAA2B;YAC7B,OAAO,EAAE;gBACP,OAAO,EAAE,+BAA+B;gBACxC,GAAG,EAAE,GAAG;aACT;SACF,CAAC;IACJ,CAAC;CAAA;AAxED,8BAwEC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" fill="none">
|
|
2
|
+
<rect x="10" y="10" width="80" height="80" rx="12" fill="#FF4500" stroke="#E0E0E0" stroke-width="2"/>
|
|
3
|
+
<path d="M30 40 Q50 30 70 40" stroke="#FFFFFF" stroke-width="4" stroke-linecap="round" fill="none"/>
|
|
4
|
+
<circle cx="35" cy="45" r="8" fill="#FFFFFF"/>
|
|
5
|
+
<circle cx="65" cy="45" r="8" fill="#FFFFFF"/>
|
|
6
|
+
<circle cx="35" cy="45" r="3" fill="#E0E0E0"/>
|
|
7
|
+
<circle cx="65" cy="45" r="3" fill="#E0E0E0"/>
|
|
8
|
+
<path d="M40 60 Q50 70 60 60" stroke="#FFFFFF" stroke-width="3" stroke-linecap="round" fill="none"/>
|
|
9
|
+
<rect x="20" y="25" width="25" height="8" rx="2" fill="#FF5722"/>
|
|
10
|
+
<rect x="55" y="25" width="25" height="8" rx="2" fill="#FF5722"/>
|
|
11
|
+
</svg>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" fill="none">
|
|
2
|
+
<rect x="10" y="10" width="80" height="80" rx="12" fill="#FF4500" stroke="#1A1A1B" stroke-width="2"/>
|
|
3
|
+
<path d="M30 40 Q50 30 70 40" stroke="#FFFFFF" stroke-width="4" stroke-linecap="round" fill="none"/>
|
|
4
|
+
<circle cx="35" cy="45" r="8" fill="#FFFFFF"/>
|
|
5
|
+
<circle cx="65" cy="45" r="8" fill="#FFFFFF"/>
|
|
6
|
+
<circle cx="35" cy="45" r="3" fill="#1A1A1B"/>
|
|
7
|
+
<circle cx="65" cy="45" r="3" fill="#1A1A1B"/>
|
|
8
|
+
<path d="M40 60 Q50 70 60 60" stroke="#FFFFFF" stroke-width="3" stroke-linecap="round" fill="none"/>
|
|
9
|
+
<rect x="20" y="25" width="25" height="8" rx="2" fill="#FF5722"/>
|
|
10
|
+
<rect x="55" y="25" width="25" height="8" rx="2" fill="#FF5722"/>
|
|
11
|
+
</svg>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type IExecuteFunctions, type INodeType, type INodeTypeDescription, type INodeExecutionData } from 'n8n-workflow';
|
|
2
|
+
export declare class Redlib implements INodeType {
|
|
3
|
+
description: INodeTypeDescription;
|
|
4
|
+
private getNodeProperties;
|
|
5
|
+
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
|
|
6
|
+
}
|