Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/actions/spelling/expect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,6 @@ MUAs
MULTIAPPEND
multiscript
murchison
mutltiple
muttmua
Muttrc
mybox
Expand Down Expand Up @@ -711,6 +710,7 @@ showcerts
showq
sievec
sievemailinglist
singleval
slashdot
smartsieve
smbfs
Expand Down Expand Up @@ -849,7 +849,6 @@ unpriv
unsubscribable
unsubscriptions
uoff
Uou
uppercased
uppercasing
upperfirst
Expand Down
2 changes: 1 addition & 1 deletion .vitepress/theme/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
}

section.VPSidebarItem.level-0:not(.collapsible) {
padding-bottom: 12px !important;
padding-bottom: 12px !important;
}

.VPNavBar.has-sidebar .content {
Expand Down
5 changes: 4 additions & 1 deletion components/DoveadmCliComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ const d = computed(() => props.data)
<tbody>
<template v-for="elem in d.args">
<tr>
<td><code>{{ elem.flag }}</code></td>
<td>
<code>{{ elem.flag }}</code>
<span v-if="elem.singleval"><Badge type="warning">single value</Badge></span>
</td>
<td>{{ elem.type }}</td>
<td v-html="elem.text" />
<td><code v-if="elem.example !== undefined">{{ JSON.stringify(elem.example) }}</code></td>
Expand Down
5 changes: 4 additions & 1 deletion components/DoveadmHttpApiComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,10 @@ const examples = computed(() => {
<tbody>
<template v-for="elem in d.args">
<tr v-if="!elem.cli_only">
<td><code>{{ elem.param }}</code></td>
<td>
<code>{{ elem.param }}</code>
<span v-if="elem.singleval"><Badge type="warning">single value</Badge></span>
</td>
<td>{{ elem.type }}</td>
<td v-html="elem.text" />
<td><code v-if="elem.example">{{ JSON.stringify(elem.example) }}</code></td>
Expand Down
32 changes: 16 additions & 16 deletions data/doveadm.js
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,8 @@ Applicable to [[link,mdbox]] and [[link,sdbox]] mailbox formats only.
user: {
example: 'username',
positional: true,
type: doveadm_arg_types.STRING,
text: `Login UID.`,
type: doveadm_arg_types.STRING_SINGLEVAL,
text: `The user to add.`,
},
password: {
example: `password`,
Expand Down Expand Up @@ -354,8 +354,8 @@ Applicable to [[link,mdbox]] and [[link,sdbox]] mailbox formats only.
user: {
example: 'username',
positional: true,
type: doveadm_arg_types.ARRAY,
text: `UID of user to query.`,
type: doveadm_arg_types.STRING_SINGLEVAL,
text: `Login UID.`,
},
},
man: 'doveadm-auth',
Expand Down Expand Up @@ -391,8 +391,8 @@ Applicable to [[link,mdbox]] and [[link,sdbox]] mailbox formats only.
user: {
example: 'username',
positional: true,
type: doveadm_arg_types.STRING,
text: `Login UID.`
type: doveadm_arg_types.STRING_SINGLEVAL,
text: `Login UID.`,
},
password: {
example: `password`,
Expand Down Expand Up @@ -718,7 +718,7 @@ the source user name, e.g., \`user sourceuser\`.`
user: {
cli: 'u',
example: 'username',
type: doveadm_arg_types.STRING,
type: doveadm_arg_types.STRING_SINGLEVAL,
text: `uid of user to query.`,
},
'dict-uri': {
Expand All @@ -743,7 +743,7 @@ the source user name, e.g., \`user sourceuser\`.`
user: {
cli: 'u',
example: 'username',
type: doveadm_arg_types.STRING,
type: doveadm_arg_types.STRING_SINGLEVAL,
text: `uid of user to modify.`,
},
'dict-uri': {
Expand Down Expand Up @@ -774,8 +774,8 @@ the source user name, e.g., \`user sourceuser\`.`
user: {
cli: 'u',
example: 'username',
type: doveadm_arg_types.STRING,
text: `uid of user to query.`,
type: doveadm_arg_types.STRING_SINGLEVAL,
text: `Username to use for schemes that require one.`,
},
exact: {
cli: '1',
Expand Down Expand Up @@ -814,7 +814,7 @@ the source user name, e.g., \`user sourceuser\`.`
user: {
cli: 'u',
example: 'username',
type: doveadm_arg_types.STRING,
type: doveadm_arg_types.STRING_SINGLEVAL,
text: `uid of user to query.`,
},
'dict-uri': {
Expand Down Expand Up @@ -844,7 +844,7 @@ the source user name, e.g., \`user sourceuser\`.`
args: {
user: {
example: 'username',
type: doveadm_arg_types.STRING,
type: doveadm_arg_types.STRING_SINGLEVAL,
text: `uid of user to query.`,
},
'dict-uri': {
Expand Down Expand Up @@ -1485,8 +1485,8 @@ For each mailbox that has FTS data, it outputs the following key/value fields:
user: {
example: 'username',
positional: true,
type: doveadm_arg_types.STRING,
text: `The user to add.`,
type: doveadm_arg_types.STRING_SINGLEVAL,
text: `UID of user to query.`,
},
mailbox: {
example: 'INBOX',
Expand Down Expand Up @@ -2539,8 +2539,8 @@ returned.`,
user: {
cli: 'u',
example: 'username',
type: doveadm_arg_types.STRING,
text: `Username to use for schemes that require one.`,
type: doveadm_arg_types.STRING_SINGLEVAL,
text: `uid of user to query.`,
},
'reverse-verify': {
cli: 'V',
Expand Down
6 changes: 5 additions & 1 deletion lib/doveadm.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export const doveadm_arg_types = {
STRING: 4,
SEARCH_QUERY: 5, // Search query is an ARG_ARRAY
ISTREAM: 6,
STRING_SINGLEVAL: 7,
}

/* List of Doveadm flag value types. */
Expand Down Expand Up @@ -91,7 +92,7 @@ const doveadm_userargs = {
user: {
cli: 'u',
example: 'username',
type: doveadm_arg_types.STRING,
type: doveadm_arg_types.STRING_SINGLEVAL,
text: `UID of user to apply operation to.`,
},
}
Expand Down Expand Up @@ -124,6 +125,8 @@ function typeToString(type) {
return 'search_query'
case doveadm_arg_types.ISTREAM:
return 'istream'
case doveadm_arg_types.STRING_SINGLEVAL:
return 'string'
}
}

Expand Down Expand Up @@ -199,6 +202,7 @@ async function normalizeDoveadm(doveadm) {
example: v2.example,
flag: v2.cli ? '-' + v2.cli : (v2.positional ? k2 : '--' + k2),
param: argToHttpParam(k2),
singleval: v2.type === doveadm_arg_types.STRING_SINGLEVAL,
type: typeToString(v2.type),
text: v2.text ? md.render(v2.text) : null
})
Expand Down
Loading