You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
plugins:: [] PluginPlugin :: (yargs ::PluginFriendlyYargs) -> {
yargs::PluginFriendlyYargs, -- The same yargs object, but with possibly-- extra .command()'s tacked onto it, or-- modified via .updateCommand()targetUrl:: {templateUrl::String, name::String, argv:: {}} ->urlToUse::String-- argv is from yargs
}
PluginFriendlyYargs :: {
...yargs,
updateCommand:: (
command::String, -- The command to update, throws ("use .command()-- instead") if command does not exist.
{
alias::OverrideCommandConfiguration,
default::OverrideCommandConfiguration,
description::OverrideCommandConfiguration,
builder::OverrideCommandConfiguration,
* ::OverrideCommandConfiguration-- Enumerate them all, use those defined.
}
) ->PluginFriendlyYargs
}
OverrideCommandConfiguration :: ValueReplacer | ValueValueReplacer :: prevValue -> updatedOrSameOrOtherValue
Value :: (Any, but not a Function) -- Easily override with String or Boolean constant
duplicati-generate-config-plugin-b2
import{URL}from'url'import{compose}from'ramda'import{prepend,removeAnyLeadingSlash,cleanHostname}from'../extractable-modules/string-manipulation'exportdefaultyargs=>({yargs: yargs.updateCommand({command: 'generate',builder: originalBuilder=>argv=>originalBuilder(argv).option('name-suffix',{default: ' to b2 backblaze',description: 'Appended to each backup set name the definitions, to the resulting config file',type: 'string'})}),targetUrl: ({templateTargetUrl, name})=>{consturl=newURL(templateTargetUrl)url.hostname=compose(prepend('duplicati-'),removeAnyLeadingSlash,cleanHostname)(name)url.pathname='/'returnurl.toString()}})
Thoughts on possible plugin API
duplicati-generate-config-plugin-b2
TODO
[--plugin <module>]*
[--plugin-inline <js>]*
duplicati-generate-config-plugin-b2
({"keywords": ["duplicati-generate-config-plugin"], "peerDependencies": {"duplicati-generate-config": "1"}
).--name-suffix
, default" to b2 backblaze"
The text was updated successfully, but these errors were encountered: