@remnawave/backend-contract 2.2.17 → 2.2.18

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":"passkey-settings.schema.d.ts","sourceRoot":"","sources":["../../../../models/remnawave-settings/passkey-settings.schema.ts"],"names":[],"mappings":"AAEA,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,eAAO,MAAM,qBAAqB;;;;;;;;;;;;EAyBhC,CAAC"}
1
+ {"version":3,"file":"passkey-settings.schema.d.ts","sourceRoot":"","sources":["../../../../models/remnawave-settings/passkey-settings.schema.ts"],"names":[],"mappings":"AAEA,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,eAAO,MAAM,qBAAqB;;;;;;;;;;;;EA2BhC,CAAC"}
@@ -9,15 +9,17 @@ const isURL_1 = __importDefault(require("validator/lib/isURL"));
9
9
  const zod_1 = __importDefault(require("zod"));
10
10
  exports.PasskeySettingsSchema = zod_1.default.object({
11
11
  enabled: zod_1.default.boolean(),
12
- rpId: zod_1.default.nullable(zod_1.default.string().refine((val) => (0, isFQDN_1.default)(val, {
13
- require_tld: true,
14
- }), 'Must me a valid fully qualified domain name (FQDN), e.g. "remnawave.com"')),
15
- origin: zod_1.default.nullable(zod_1.default.string().refine((val) => (0, isURL_1.default)(val, {
16
- protocols: ['http', 'https'],
17
- require_protocol: true,
18
- require_valid_protocol: true,
19
- allow_fragments: false,
20
- allow_query_components: false,
21
- allow_trailing_dot: false,
22
- }), 'Must me a valid URL, e.g. "https://remnawave.com"')),
12
+ rpId: zod_1.default.nullable(zod_1.default.string().refine((val) => val === 'localhost' ||
13
+ (0, isFQDN_1.default)(val, {
14
+ require_tld: true,
15
+ }), 'Must be a valid fully qualified domain name (FQDN), e.g. "remnawave.com" or "localhost"')),
16
+ origin: zod_1.default.nullable(zod_1.default.string().refine((val) => /^http[s]?:\/\/localhost:\d+$/.test(val) ||
17
+ (0, isURL_1.default)(val, {
18
+ protocols: ['http', 'https'],
19
+ require_protocol: true,
20
+ require_valid_protocol: true,
21
+ allow_fragments: false,
22
+ allow_query_components: false,
23
+ allow_trailing_dot: false,
24
+ }), 'Must be a valid URL, e.g. "https://remnawave.com"')),
23
25
  });
@@ -9,15 +9,17 @@ const isURL_1 = __importDefault(require("validator/lib/isURL"));
9
9
  const zod_1 = __importDefault(require("zod"));
10
10
  exports.PasskeySettingsSchema = zod_1.default.object({
11
11
  enabled: zod_1.default.boolean(),
12
- rpId: zod_1.default.nullable(zod_1.default.string().refine((val) => (0, isFQDN_1.default)(val, {
13
- require_tld: true,
14
- }), 'Must me a valid fully qualified domain name (FQDN), e.g. "remnawave.com"')),
15
- origin: zod_1.default.nullable(zod_1.default.string().refine((val) => (0, isURL_1.default)(val, {
16
- protocols: ['http', 'https'],
17
- require_protocol: true,
18
- require_valid_protocol: true,
19
- allow_fragments: false,
20
- allow_query_components: false,
21
- allow_trailing_dot: false,
22
- }), 'Must me a valid URL, e.g. "https://remnawave.com"')),
12
+ rpId: zod_1.default.nullable(zod_1.default.string().refine((val) => val === 'localhost' ||
13
+ (0, isFQDN_1.default)(val, {
14
+ require_tld: true,
15
+ }), 'Must be a valid fully qualified domain name (FQDN), e.g. "remnawave.com" or "localhost"')),
16
+ origin: zod_1.default.nullable(zod_1.default.string().refine((val) => /^http[s]?:\/\/localhost:\d+$/.test(val) ||
17
+ (0, isURL_1.default)(val, {
18
+ protocols: ['http', 'https'],
19
+ require_protocol: true,
20
+ require_valid_protocol: true,
21
+ allow_fragments: false,
22
+ allow_query_components: false,
23
+ allow_trailing_dot: false,
24
+ }), 'Must be a valid URL, e.g. "https://remnawave.com"')),
23
25
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remnawave/backend-contract",
3
- "version": "2.2.17",
3
+ "version": "2.2.18",
4
4
  "public": true,
5
5
  "license": "AGPL-3.0-only",
6
6
  "description": "A contract library for Remnawave Backend. It can be used in backend and frontend.",