@appium/typedoc-plugin-appium
Version:
TypeDoc plugin for Appium & its extensions
61 lines • 2.41 kB
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.isPackageTitles = exports.isPackageTitle = exports.declarations = void 0;
const lodash_1 = __importDefault(require("lodash"));
const typedoc_1 = require("typedoc");
const model_1 = require("../model");
/**
* List of options for the plugin
* @internal
*/
exports.declarations = {
commandsDir: {
defaultValue: 'commands',
help: `(${model_1.NS}) Name of "commands" directory under the TypeDoc output directory. Not a full path`,
name: 'commandsDir',
type: typedoc_1.ParameterType.String,
},
forceBreadcrumbs: {
defaultValue: false,
help: `(${model_1.NS}) Force breadcrumbs to be shown; overrides "hideBreadcrumbs"`,
name: 'forceBreadcrumbs',
type: typedoc_1.ParameterType.Boolean,
},
outputBuiltinCommands: {
defaultValue: false,
help: `(${model_1.NS}) Output builtin commands`,
name: 'outputBuiltinCommands',
type: typedoc_1.ParameterType.Boolean,
},
outputModules: {
defaultValue: true,
help: `(${model_1.NS}) Output modules APIs in addition to commands. This is needed for complete typing information`,
name: 'outputModules',
type: typedoc_1.ParameterType.Boolean,
},
packageTitles: {
defaultValue: [],
help: `(${model_1.NS}) An array of objects with props "name" (module name) and "title" (display name)`,
name: 'packageTitles',
type: typedoc_1.ParameterType.Mixed,
validate(val) {
if (!isPackageTitles(val)) {
throw new Error(`Invalid value for "packageTitles" option; must be an array of objects with props "name" (module name) and "title" (display name): ${val}`);
}
},
},
};
function isPackageTitle(value) {
return lodash_1.default.isPlainObject(value) && lodash_1.default.isString(value.name) && lodash_1.default.isString(value.title);
}
exports.isPackageTitle = isPackageTitle;
function isPackageTitles(value) {
return lodash_1.default.isArray(value) && value.every(isPackageTitle);
}
exports.isPackageTitles = isPackageTitles;
// type sanity check
exports.declarations;
//# sourceMappingURL=declarations.js.map