@remnawave/node-plugins 0.0.3 → 0.0.4

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,3 +1,2 @@
1
- export * from './constants';
2
1
  export * from './models';
3
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
@@ -14,5 +14,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./constants"), exports);
18
17
  __exportStar(require("./models"), exports);
@@ -11,10 +11,6 @@ export declare const SharedIpListSchema: z.ZodObject<{
11
11
  }>;
12
12
  export declare const TorrentBlockerPluginSchema: z.ZodObject<{
13
13
  enabled: z.ZodBoolean;
14
- mode: z.ZodNativeEnum<{
15
- readonly BLOCK: "BLOCK";
16
- readonly NOTIFY: "NOTIFY";
17
- }>;
18
14
  blockDuration: z.ZodNumber;
19
15
  ignoreLists: z.ZodObject<{
20
16
  ip: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodString]>, "many">>>;
@@ -28,7 +24,6 @@ export declare const TorrentBlockerPluginSchema: z.ZodObject<{
28
24
  }>;
29
25
  }, "strip", z.ZodTypeAny, {
30
26
  enabled: boolean;
31
- mode: "BLOCK" | "NOTIFY";
32
27
  blockDuration: number;
33
28
  ignoreLists: {
34
29
  ip: string[];
@@ -36,7 +31,6 @@ export declare const TorrentBlockerPluginSchema: z.ZodObject<{
36
31
  };
37
32
  }, {
38
33
  enabled: boolean;
39
- mode: "BLOCK" | "NOTIFY";
40
34
  blockDuration: number;
41
35
  ignoreLists: {
42
36
  ip?: string[] | undefined;
@@ -76,10 +70,6 @@ export declare const NodePluginsSchema: z.ZodObject<{
76
70
  }>, "many">;
77
71
  torrentBlocker: z.ZodOptional<z.ZodObject<{
78
72
  enabled: z.ZodBoolean;
79
- mode: z.ZodNativeEnum<{
80
- readonly BLOCK: "BLOCK";
81
- readonly NOTIFY: "NOTIFY";
82
- }>;
83
73
  blockDuration: z.ZodNumber;
84
74
  ignoreLists: z.ZodObject<{
85
75
  ip: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodString]>, "many">>>;
@@ -93,7 +83,6 @@ export declare const NodePluginsSchema: z.ZodObject<{
93
83
  }>;
94
84
  }, "strip", z.ZodTypeAny, {
95
85
  enabled: boolean;
96
- mode: "BLOCK" | "NOTIFY";
97
86
  blockDuration: number;
98
87
  ignoreLists: {
99
88
  ip: string[];
@@ -101,7 +90,6 @@ export declare const NodePluginsSchema: z.ZodObject<{
101
90
  };
102
91
  }, {
103
92
  enabled: boolean;
104
- mode: "BLOCK" | "NOTIFY";
105
93
  blockDuration: number;
106
94
  ignoreLists: {
107
95
  ip?: string[] | undefined;
@@ -135,7 +123,6 @@ export declare const NodePluginsSchema: z.ZodObject<{
135
123
  }[];
136
124
  torrentBlocker?: {
137
125
  enabled: boolean;
138
- mode: "BLOCK" | "NOTIFY";
139
126
  blockDuration: number;
140
127
  ignoreLists: {
141
128
  ip: string[];
@@ -157,7 +144,6 @@ export declare const NodePluginsSchema: z.ZodObject<{
157
144
  }[];
158
145
  torrentBlocker?: {
159
146
  enabled: boolean;
160
- mode: "BLOCK" | "NOTIFY";
161
147
  blockDuration: number;
162
148
  ignoreLists: {
163
149
  ip?: string[] | undefined;
@@ -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;AAIxB,eAAO,MAAM,kBAAkB;;;;;;;;;EAG7B,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWrC,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,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"}
@@ -2,14 +2,12 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.NodePluginsSchema = exports.ConnectionDropPluginSchema = exports.BlacklistPluginSchema = exports.TorrentBlockerPluginSchema = exports.SharedIpListSchema = void 0;
4
4
  const zod_1 = require("zod");
5
- const constants_1 = require("../constants");
6
5
  exports.SharedIpListSchema = zod_1.z.object({
7
6
  name: zod_1.z.string().startsWith('ext:'),
8
7
  ipList: zod_1.z.array(zod_1.z.string().ip()),
9
8
  });
10
9
  exports.TorrentBlockerPluginSchema = zod_1.z.object({
11
10
  enabled: zod_1.z.boolean(),
12
- mode: zod_1.z.nativeEnum(constants_1.TORRENT_BLOCKER_MODES),
13
11
  blockDuration: zod_1.z.number().int(),
14
12
  ignoreLists: zod_1.z.object({
15
13
  ip: zod_1.z
@@ -14,5 +14,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./constants"), exports);
18
17
  __exportStar(require("./models"), exports);
@@ -2,14 +2,12 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.NodePluginsSchema = exports.ConnectionDropPluginSchema = exports.BlacklistPluginSchema = exports.TorrentBlockerPluginSchema = exports.SharedIpListSchema = void 0;
4
4
  const zod_1 = require("zod");
5
- const constants_1 = require("../constants");
6
5
  exports.SharedIpListSchema = zod_1.z.object({
7
6
  name: zod_1.z.string().startsWith('ext:'),
8
7
  ipList: zod_1.z.array(zod_1.z.string().ip()),
9
8
  });
10
9
  exports.TorrentBlockerPluginSchema = zod_1.z.object({
11
10
  enabled: zod_1.z.boolean(),
12
- mode: zod_1.z.nativeEnum(constants_1.TORRENT_BLOCKER_MODES),
13
11
  blockDuration: zod_1.z.number().int(),
14
12
  ignoreLists: zod_1.z.object({
15
13
  ip: zod_1.z
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remnawave/node-plugins",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "public": true,
5
5
  "license": "AGPL-3.0-only",
6
6
  "description": "A library for Remnawave Node Plugins.",
@@ -1,2 +0,0 @@
1
- export * from './torrent-blocker';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../constants/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC"}
@@ -1,17 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./torrent-blocker"), exports);
@@ -1,2 +0,0 @@
1
- export * from './torrent-blocker.constants';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../constants/torrent-blocker/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC"}
@@ -1,17 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./torrent-blocker.constants"), exports);
@@ -1,8 +0,0 @@
1
- export declare const TORRENT_BLOCKER_MODES: {
2
- readonly BLOCK: "BLOCK";
3
- readonly NOTIFY: "NOTIFY";
4
- };
5
- export type TTorrentBlockerMode = (typeof TORRENT_BLOCKER_MODES)[keyof typeof TORRENT_BLOCKER_MODES];
6
- export declare const TORRENT_BLOCKER_MODES_VALUES: ("BLOCK" | "NOTIFY")[];
7
- export declare const isTorrentBlockerMode: (value: string) => value is TTorrentBlockerMode;
8
- //# sourceMappingURL=torrent-blocker.constants.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"torrent-blocker.constants.d.ts","sourceRoot":"","sources":["../../../../constants/torrent-blocker/torrent-blocker.constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB;;;CAGxB,CAAC;AAEX,MAAM,MAAM,mBAAmB,GAC3B,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,OAAO,qBAAqB,CAAC,CAAC;AAEvE,eAAO,MAAM,4BAA4B,wBAAuC,CAAC;AAEjF,eAAO,MAAM,oBAAoB,GAAI,OAAO,MAAM,KAAG,KAAK,IAAI,mBAE7D,CAAC"}
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isTorrentBlockerMode = exports.TORRENT_BLOCKER_MODES_VALUES = exports.TORRENT_BLOCKER_MODES = void 0;
4
- exports.TORRENT_BLOCKER_MODES = {
5
- BLOCK: 'BLOCK',
6
- NOTIFY: 'NOTIFY',
7
- };
8
- exports.TORRENT_BLOCKER_MODES_VALUES = Object.values(exports.TORRENT_BLOCKER_MODES);
9
- const isTorrentBlockerMode = (value) => {
10
- return exports.TORRENT_BLOCKER_MODES_VALUES.includes(value);
11
- };
12
- exports.isTorrentBlockerMode = isTorrentBlockerMode;
@@ -1,17 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./torrent-blocker"), exports);
@@ -1,17 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./torrent-blocker.constants"), exports);
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isTorrentBlockerMode = exports.TORRENT_BLOCKER_MODES_VALUES = exports.TORRENT_BLOCKER_MODES = void 0;
4
- exports.TORRENT_BLOCKER_MODES = {
5
- BLOCK: 'BLOCK',
6
- NOTIFY: 'NOTIFY',
7
- };
8
- exports.TORRENT_BLOCKER_MODES_VALUES = Object.values(exports.TORRENT_BLOCKER_MODES);
9
- const isTorrentBlockerMode = (value) => {
10
- return exports.TORRENT_BLOCKER_MODES_VALUES.includes(value);
11
- };
12
- exports.isTorrentBlockerMode = isTorrentBlockerMode;