Skip to content

Commit ed796a9

Browse files
committed
fix: updated host tag validation to allow colons and increased the maximum length from 16 to 32 characters in create and update commands.
1 parent b38c775 commit ed796a9

File tree

4 files changed

+17
-17
lines changed

4 files changed

+17
-17
lines changed

.github/workflows/deploy-lib.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ jobs:
3131
env:
3232
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
3333

34-
- name: Install HashedSet dependencies and build
35-
working-directory: 'libs/hashed-set'
36-
run: npm i && npm run prepublish
34+
# - name: Install HashedSet dependencies and build
35+
# working-directory: 'libs/hashed-set'
36+
# run: npm i && npm run prepublish
3737

38-
- name: Publish HashedSet package on NPM
39-
working-directory: 'libs/hashed-set'
40-
run: npm publish --provenance --access public
41-
env:
42-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
38+
# - name: Publish HashedSet package on NPM
39+
# working-directory: 'libs/hashed-set'
40+
# run: npm publish --provenance --access public
41+
# env:
42+
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
4343

4444
send-telegram-message:
4545
name: Send Telegram message

libs/contract/commands/hosts/create.command.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,14 @@ export namespace CreateHostCommand {
6161
z
6262
.string()
6363
.regex(
64-
/^[A-Z0-9_]+$/,
65-
'Tag can only contain uppercase letters, numbers, underscores',
64+
/^[A-Z0-9_:]+$/,
65+
'Tag can only contain uppercase letters, numbers, underscores and colons',
6666
)
67-
.max(16, 'Tag must be less than 16 characters')
67+
.max(32, 'Tag must be less than 32 characters')
6868
.nullable(),
6969
)
7070
.describe(
71-
'Optional. Host tag for categorization. Max 16 characters, uppercase letters, numbers and underscores only.',
71+
'Optional. Host tag for categorization. Max 32 characters, uppercase letters, numbers, underscores and colons are allowed.',
7272
),
7373
isHidden: z.optional(z.boolean().default(false)),
7474
});

libs/contract/commands/hosts/update.command.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,14 @@ export namespace UpdateHostCommand {
6565
z
6666
.string()
6767
.regex(
68-
/^[A-Z0-9_]+$/,
69-
'Tag can only contain uppercase letters, numbers, underscores',
68+
/^[A-Z0-9_:]+$/,
69+
'Tag can only contain uppercase letters, numbers, underscores and colons',
7070
)
71-
.max(16, 'Tag must be less than 16 characters')
71+
.max(32, 'Tag must be less than 32 characters')
7272
.nullable(),
7373
)
7474
.describe(
75-
'Optional. Host tag for categorization. Max 16 characters, uppercase letters, numbers and underscores only.',
75+
'Optional. Host tag for categorization. Max 32 characters, uppercase letters, numbers, underscores and colons are allowed.',
7676
),
7777
isHidden: z.optional(z.boolean()),
7878
});

libs/contract/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@remnawave/backend-contract",
3-
"version": "2.1.5",
3+
"version": "2.1.6",
44
"public": true,
55
"license": "AGPL-3.0-only",
66
"description": "A contract library for Remnawave Backend. It can be used in backend and frontend.",

0 commit comments

Comments
 (0)