@remnawave/node-plugins 0.0.4 → 0.0.5

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,13 +1,16 @@
1
1
  import { z } from 'zod';
2
- export declare const SharedIpListSchema: z.ZodObject<{
2
+ export declare const SharedListSchema: z.ZodObject<{
3
3
  name: z.ZodString;
4
- ipList: z.ZodArray<z.ZodString, "many">;
4
+ type: z.ZodEnum<["ipList"]>;
5
+ items: z.ZodArray<z.ZodString, "many">;
5
6
  }, "strip", z.ZodTypeAny, {
6
7
  name: string;
7
- ipList: string[];
8
+ type: "ipList";
9
+ items: string[];
8
10
  }, {
9
11
  name: string;
10
- ipList: string[];
12
+ type: "ipList";
13
+ items: string[];
11
14
  }>;
12
15
  export declare const TorrentBlockerPluginSchema: z.ZodObject<{
13
16
  enabled: z.ZodBoolean;
@@ -57,17 +60,20 @@ export declare const ConnectionDropPluginSchema: z.ZodObject<{
57
60
  enabled: boolean;
58
61
  whitelistIps: string[];
59
62
  }>;
60
- export declare const NodePluginsSchema: z.ZodObject<{
61
- sharedLists: z.ZodArray<z.ZodObject<{
63
+ export declare const NodePluginSchema: z.ZodObject<{
64
+ sharedLists: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
62
65
  name: z.ZodString;
63
- ipList: z.ZodArray<z.ZodString, "many">;
66
+ type: z.ZodEnum<["ipList"]>;
67
+ items: z.ZodArray<z.ZodString, "many">;
64
68
  }, "strip", z.ZodTypeAny, {
65
69
  name: string;
66
- ipList: string[];
70
+ type: "ipList";
71
+ items: string[];
67
72
  }, {
68
73
  name: string;
69
- ipList: string[];
70
- }>, "many">;
74
+ type: "ipList";
75
+ items: string[];
76
+ }>, "many">>>;
71
77
  torrentBlocker: z.ZodOptional<z.ZodObject<{
72
78
  enabled: z.ZodBoolean;
73
79
  blockDuration: z.ZodNumber;
@@ -119,7 +125,8 @@ export declare const NodePluginsSchema: z.ZodObject<{
119
125
  }, "strip", z.ZodTypeAny, {
120
126
  sharedLists: {
121
127
  name: string;
122
- ipList: string[];
128
+ type: "ipList";
129
+ items: string[];
123
130
  }[];
124
131
  torrentBlocker?: {
125
132
  enabled: boolean;
@@ -138,10 +145,11 @@ export declare const NodePluginsSchema: z.ZodObject<{
138
145
  whitelistIps: string[];
139
146
  } | undefined;
140
147
  }, {
141
- sharedLists: {
148
+ sharedLists?: {
142
149
  name: string;
143
- ipList: string[];
144
- }[];
150
+ type: "ipList";
151
+ items: string[];
152
+ }[] | undefined;
145
153
  torrentBlocker?: {
146
154
  enabled: boolean;
147
155
  blockDuration: number;
@@ -159,5 +167,5 @@ export declare const NodePluginsSchema: z.ZodObject<{
159
167
  whitelistIps: string[];
160
168
  } | undefined;
161
169
  }>;
162
- export type TNodePlugins = z.infer<typeof NodePluginsSchema>;
170
+ export type TNodePlugin = z.infer<typeof NodePluginSchema>;
163
171
  //# sourceMappingURL=node-plugins.schema.d.ts.map
@@ -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,kBAAkB;;;;;;;;;EAG7B,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUrC,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;EAGhC,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;;;;;;;EAGrC,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAK5B,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,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;;;;;;;;;;;;;;;;;;;;;;;;;;;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,10 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.NodePluginsSchema = exports.ConnectionDropPluginSchema = exports.BlacklistPluginSchema = exports.TorrentBlockerPluginSchema = exports.SharedIpListSchema = void 0;
3
+ exports.NodePluginSchema = exports.ConnectionDropPluginSchema = exports.BlacklistPluginSchema = exports.TorrentBlockerPluginSchema = exports.SharedListSchema = void 0;
4
4
  const zod_1 = require("zod");
5
- exports.SharedIpListSchema = zod_1.z.object({
5
+ exports.SharedListSchema = zod_1.z.object({
6
6
  name: zod_1.z.string().startsWith('ext:'),
7
- ipList: zod_1.z.array(zod_1.z.string().ip()),
7
+ type: zod_1.z.enum(['ipList']),
8
+ items: zod_1.z.array(zod_1.z.string()),
8
9
  });
9
10
  exports.TorrentBlockerPluginSchema = zod_1.z.object({
10
11
  enabled: zod_1.z.boolean(),
@@ -25,8 +26,8 @@ exports.ConnectionDropPluginSchema = zod_1.z.object({
25
26
  enabled: zod_1.z.boolean(),
26
27
  whitelistIps: zod_1.z.array(zod_1.z.union([zod_1.z.string().ip(), zod_1.z.string().startsWith('ext:')])),
27
28
  });
28
- exports.NodePluginsSchema = zod_1.z.object({
29
- sharedLists: zod_1.z.array(exports.SharedIpListSchema),
29
+ exports.NodePluginSchema = zod_1.z.object({
30
+ sharedLists: zod_1.z.array(exports.SharedListSchema).optional().default([]),
30
31
  torrentBlocker: exports.TorrentBlockerPluginSchema.optional(),
31
32
  blacklist: exports.BlacklistPluginSchema.optional(),
32
33
  connectionDrop: exports.ConnectionDropPluginSchema.optional(),
@@ -1,10 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.NodePluginsSchema = exports.ConnectionDropPluginSchema = exports.BlacklistPluginSchema = exports.TorrentBlockerPluginSchema = exports.SharedIpListSchema = void 0;
3
+ exports.NodePluginSchema = exports.ConnectionDropPluginSchema = exports.BlacklistPluginSchema = exports.TorrentBlockerPluginSchema = exports.SharedListSchema = void 0;
4
4
  const zod_1 = require("zod");
5
- exports.SharedIpListSchema = zod_1.z.object({
5
+ exports.SharedListSchema = zod_1.z.object({
6
6
  name: zod_1.z.string().startsWith('ext:'),
7
- ipList: zod_1.z.array(zod_1.z.string().ip()),
7
+ type: zod_1.z.enum(['ipList']),
8
+ items: zod_1.z.array(zod_1.z.string()),
8
9
  });
9
10
  exports.TorrentBlockerPluginSchema = zod_1.z.object({
10
11
  enabled: zod_1.z.boolean(),
@@ -25,8 +26,8 @@ exports.ConnectionDropPluginSchema = zod_1.z.object({
25
26
  enabled: zod_1.z.boolean(),
26
27
  whitelistIps: zod_1.z.array(zod_1.z.union([zod_1.z.string().ip(), zod_1.z.string().startsWith('ext:')])),
27
28
  });
28
- exports.NodePluginsSchema = zod_1.z.object({
29
- sharedLists: zod_1.z.array(exports.SharedIpListSchema),
29
+ exports.NodePluginSchema = zod_1.z.object({
30
+ sharedLists: zod_1.z.array(exports.SharedListSchema).optional().default([]),
30
31
  torrentBlocker: exports.TorrentBlockerPluginSchema.optional(),
31
32
  blacklist: exports.BlacklistPluginSchema.optional(),
32
33
  connectionDrop: exports.ConnectionDropPluginSchema.optional(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remnawave/node-plugins",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "public": true,
5
5
  "license": "AGPL-3.0-only",
6
6
  "description": "A library for Remnawave Node Plugins.",