@remnawave/node-plugins 0.0.5 → 0.0.6

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.
@@ -1 +1 @@
1
- {"version":3,"file":"node-plugins.schema.d.ts","sourceRoot":"","sources":["../../../models/node-plugins.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,gBAAgB;;;;;;;;;;;;EAI3B,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUrC,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;EAGhC,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;;;;;;;EAGrC,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAK3B,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
1
+ {"version":3,"file":"node-plugins.schema.d.ts","sourceRoot":"","sources":["../../../models/node-plugins.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,gBAAgB;;;;;;;;;;;;EAI3B,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4CrC,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;EAahC,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;;;;;;;EAarC,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0B3B,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
@@ -8,27 +8,67 @@ exports.SharedListSchema = zod_1.z.object({
8
8
  items: zod_1.z.array(zod_1.z.string()),
9
9
  });
10
10
  exports.TorrentBlockerPluginSchema = zod_1.z.object({
11
- enabled: zod_1.z.boolean(),
12
- blockDuration: zod_1.z.number().int(),
13
- ignoreLists: zod_1.z.object({
11
+ enabled: zod_1.z.boolean().describe(JSON.stringify({
12
+ markdownDescription: 'Please review documentation for this plugin before enabling it.',
13
+ })),
14
+ blockDuration: zod_1.z
15
+ .number()
16
+ .int()
17
+ .describe(JSON.stringify({
18
+ markdownDescription: 'Duration of the block in seconds. \n\n If the block duration is 0, the block will be permanent. \n\n For example, if the block duration is 3600, the block will be permanent for 1 hour.',
19
+ })),
20
+ ignoreLists: zod_1.z
21
+ .object({
14
22
  ip: zod_1.z
15
23
  .array(zod_1.z.union([zod_1.z.string().ip(), zod_1.z.string().startsWith('ext:')]))
16
24
  .optional()
17
- .default([]),
18
- userId: zod_1.z.array(zod_1.z.number().int()).optional().default([]),
19
- }),
25
+ .default([])
26
+ .describe(JSON.stringify({
27
+ markdownDescription: 'List of IP addresses to ignore from the block. \n\n You can use lists from **sharedLists** in the format: **ext:list_name**. \n\n You can also specify user IDs to ignore from the block.',
28
+ })),
29
+ userId: zod_1.z
30
+ .array(zod_1.z.number().int())
31
+ .optional()
32
+ .default([])
33
+ .describe(JSON.stringify({
34
+ markdownDescription: 'List of user IDs to ignore from the block. \n\n You can also specify user IDs to ignore from the block.',
35
+ })),
36
+ })
37
+ .describe(JSON.stringify({
38
+ markdownDescription: 'List of IP addresses to ignore from the block. \n\n You can use lists from **sharedLists** in the format: **ext:list_name**. \n\n You can also specify user IDs to ignore from the block.',
39
+ })),
20
40
  });
21
41
  exports.BlacklistPluginSchema = zod_1.z.object({
22
- enabled: zod_1.z.boolean(),
23
- ip: zod_1.z.array(zod_1.z.union([zod_1.z.string().ip(), zod_1.z.string().startsWith('ext:')])),
42
+ enabled: zod_1.z.boolean().describe(JSON.stringify({
43
+ markdownDescription: 'If this plugin is enabled, all IP addresses specified in the **ip** object will be blocked via nftables. **Use with caution.**',
44
+ })),
45
+ ip: zod_1.z.array(zod_1.z.union([zod_1.z.string().ip(), zod_1.z.string().startsWith('ext:')])).describe(JSON.stringify({
46
+ markdownDescription: 'List of IP addresses to block via nftables. \n\n You can use lists from **sharedLists** in the format: **ext:list_name**.',
47
+ })),
24
48
  });
25
49
  exports.ConnectionDropPluginSchema = zod_1.z.object({
26
- enabled: zod_1.z.boolean(),
27
- whitelistIps: zod_1.z.array(zod_1.z.union([zod_1.z.string().ip(), zod_1.z.string().startsWith('ext:')])),
50
+ enabled: zod_1.z.boolean().describe(JSON.stringify({
51
+ markdownDescription: 'Controls whether IP addresses from the **whitelistIps** object will be used.',
52
+ })),
53
+ whitelistIps: zod_1.z.array(zod_1.z.union([zod_1.z.string().ip(), zod_1.z.string().startsWith('ext:')])).describe(JSON.stringify({
54
+ markdownDescription: 'List of IP addresses, for which the connection drop will not be applied, which is enabled by default for all IP addresses. \n\n You can use lists from **sharedLists** in the format: **ext:list_name**.',
55
+ })),
28
56
  });
29
57
  exports.NodePluginSchema = zod_1.z.object({
30
- sharedLists: zod_1.z.array(exports.SharedListSchema).optional().default([]),
31
- torrentBlocker: exports.TorrentBlockerPluginSchema.optional(),
32
- blacklist: exports.BlacklistPluginSchema.optional(),
33
- connectionDrop: exports.ConnectionDropPluginSchema.optional(),
58
+ sharedLists: zod_1.z
59
+ .array(exports.SharedListSchema)
60
+ .optional()
61
+ .default([])
62
+ .describe(JSON.stringify({
63
+ markdownDescription: 'Array of shared lists, which can be used in other plugins. Optional.',
64
+ })),
65
+ torrentBlocker: exports.TorrentBlockerPluginSchema.optional().describe(JSON.stringify({
66
+ markdownDescription: 'Torrent Blocker Plugin configuration. Optional.',
67
+ })),
68
+ blacklist: exports.BlacklistPluginSchema.optional().describe(JSON.stringify({
69
+ markdownDescription: 'Blacklist Plugin configuration. Optional.',
70
+ })),
71
+ connectionDrop: exports.ConnectionDropPluginSchema.optional().describe(JSON.stringify({
72
+ markdownDescription: 'Connection Drop Plugin configuration. Optional.',
73
+ })),
34
74
  });
@@ -8,27 +8,67 @@ exports.SharedListSchema = zod_1.z.object({
8
8
  items: zod_1.z.array(zod_1.z.string()),
9
9
  });
10
10
  exports.TorrentBlockerPluginSchema = zod_1.z.object({
11
- enabled: zod_1.z.boolean(),
12
- blockDuration: zod_1.z.number().int(),
13
- ignoreLists: zod_1.z.object({
11
+ enabled: zod_1.z.boolean().describe(JSON.stringify({
12
+ markdownDescription: 'Please review documentation for this plugin before enabling it.',
13
+ })),
14
+ blockDuration: zod_1.z
15
+ .number()
16
+ .int()
17
+ .describe(JSON.stringify({
18
+ markdownDescription: 'Duration of the block in seconds. \n\n If the block duration is 0, the block will be permanent. \n\n For example, if the block duration is 3600, the block will be permanent for 1 hour.',
19
+ })),
20
+ ignoreLists: zod_1.z
21
+ .object({
14
22
  ip: zod_1.z
15
23
  .array(zod_1.z.union([zod_1.z.string().ip(), zod_1.z.string().startsWith('ext:')]))
16
24
  .optional()
17
- .default([]),
18
- userId: zod_1.z.array(zod_1.z.number().int()).optional().default([]),
19
- }),
25
+ .default([])
26
+ .describe(JSON.stringify({
27
+ markdownDescription: 'List of IP addresses to ignore from the block. \n\n You can use lists from **sharedLists** in the format: **ext:list_name**. \n\n You can also specify user IDs to ignore from the block.',
28
+ })),
29
+ userId: zod_1.z
30
+ .array(zod_1.z.number().int())
31
+ .optional()
32
+ .default([])
33
+ .describe(JSON.stringify({
34
+ markdownDescription: 'List of user IDs to ignore from the block. \n\n You can also specify user IDs to ignore from the block.',
35
+ })),
36
+ })
37
+ .describe(JSON.stringify({
38
+ markdownDescription: 'List of IP addresses to ignore from the block. \n\n You can use lists from **sharedLists** in the format: **ext:list_name**. \n\n You can also specify user IDs to ignore from the block.',
39
+ })),
20
40
  });
21
41
  exports.BlacklistPluginSchema = zod_1.z.object({
22
- enabled: zod_1.z.boolean(),
23
- ip: zod_1.z.array(zod_1.z.union([zod_1.z.string().ip(), zod_1.z.string().startsWith('ext:')])),
42
+ enabled: zod_1.z.boolean().describe(JSON.stringify({
43
+ markdownDescription: 'If this plugin is enabled, all IP addresses specified in the **ip** object will be blocked via nftables. **Use with caution.**',
44
+ })),
45
+ ip: zod_1.z.array(zod_1.z.union([zod_1.z.string().ip(), zod_1.z.string().startsWith('ext:')])).describe(JSON.stringify({
46
+ markdownDescription: 'List of IP addresses to block via nftables. \n\n You can use lists from **sharedLists** in the format: **ext:list_name**.',
47
+ })),
24
48
  });
25
49
  exports.ConnectionDropPluginSchema = zod_1.z.object({
26
- enabled: zod_1.z.boolean(),
27
- whitelistIps: zod_1.z.array(zod_1.z.union([zod_1.z.string().ip(), zod_1.z.string().startsWith('ext:')])),
50
+ enabled: zod_1.z.boolean().describe(JSON.stringify({
51
+ markdownDescription: 'Controls whether IP addresses from the **whitelistIps** object will be used.',
52
+ })),
53
+ whitelistIps: zod_1.z.array(zod_1.z.union([zod_1.z.string().ip(), zod_1.z.string().startsWith('ext:')])).describe(JSON.stringify({
54
+ markdownDescription: 'List of IP addresses, for which the connection drop will not be applied, which is enabled by default for all IP addresses. \n\n You can use lists from **sharedLists** in the format: **ext:list_name**.',
55
+ })),
28
56
  });
29
57
  exports.NodePluginSchema = zod_1.z.object({
30
- sharedLists: zod_1.z.array(exports.SharedListSchema).optional().default([]),
31
- torrentBlocker: exports.TorrentBlockerPluginSchema.optional(),
32
- blacklist: exports.BlacklistPluginSchema.optional(),
33
- connectionDrop: exports.ConnectionDropPluginSchema.optional(),
58
+ sharedLists: zod_1.z
59
+ .array(exports.SharedListSchema)
60
+ .optional()
61
+ .default([])
62
+ .describe(JSON.stringify({
63
+ markdownDescription: 'Array of shared lists, which can be used in other plugins. Optional.',
64
+ })),
65
+ torrentBlocker: exports.TorrentBlockerPluginSchema.optional().describe(JSON.stringify({
66
+ markdownDescription: 'Torrent Blocker Plugin configuration. Optional.',
67
+ })),
68
+ blacklist: exports.BlacklistPluginSchema.optional().describe(JSON.stringify({
69
+ markdownDescription: 'Blacklist Plugin configuration. Optional.',
70
+ })),
71
+ connectionDrop: exports.ConnectionDropPluginSchema.optional().describe(JSON.stringify({
72
+ markdownDescription: 'Connection Drop Plugin configuration. Optional.',
73
+ })),
34
74
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remnawave/node-plugins",
3
- "version": "0.0.5",
3
+ "version": "0.0.6",
4
4
  "public": true,
5
5
  "license": "AGPL-3.0-only",
6
6
  "description": "A library for Remnawave Node Plugins.",