Skip to content

Commit

Permalink
auto generated mdx api doc system
Browse files Browse the repository at this point in the history
qip
  • Loading branch information
stacey-gammon committed Jan 28, 2021
1 parent 8f3e1cf commit 5ac9c3e
Show file tree
Hide file tree
Showing 64 changed files with 4,080 additions and 740 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.aws-config.json
.signing-config.json
/api_docs
.ackrc
/.es
/.chromium
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"test:ftr:runner": "node scripts/functional_test_runner",
"checkLicenses": "node scripts/check_licenses --dev",
"build": "node scripts/build --all-platforms",
"build:apidocs": "node scripts/build_api_docs",
"start": "node scripts/kibana --dev",
"debug": "node --nolazy --inspect scripts/kibana --dev",
"debug-break": "node --nolazy --inspect-brk scripts/kibana --dev",
Expand Down Expand Up @@ -819,6 +820,7 @@
"tinycolor2": "1.4.1",
"topojson-client": "3.0.0",
"ts-loader": "^7.0.5",
"ts-morph": "^9.1.0",
"tsd": "^0.13.1",
"typescript": "4.1.3",
"typescript-fsa": "^3.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@

import Path from 'path';
import loadJsonFile from 'load-json-file';
import { REPO_ROOT } from '@kbn/utils';

export interface KibanaPlatformPlugin {
readonly directory: string;
readonly manifestPath: string;
readonly manifest: Manifest;
readonly relativeDirectory: string;
}

function isValidDepsDeclaration(input: unknown, type: string): string[] {
Expand All @@ -29,6 +31,7 @@ interface Manifest {
server: boolean;
kibanaVersion: string;
version: string;
serviceFolders: readonly string[];
requiredPlugins: readonly string[];
optionalPlugins: readonly string[];
requiredBundles: readonly string[];
Expand All @@ -54,6 +57,7 @@ export function parseKibanaPlatformPlugin(manifestPath: string): KibanaPlatformP
}

return {
relativeDirectory: Path.dirname(manifestPath).slice(REPO_ROOT.length),
directory: Path.dirname(manifestPath),
manifestPath,
manifest: {
Expand All @@ -64,6 +68,7 @@ export function parseKibanaPlatformPlugin(manifestPath: string): KibanaPlatformP
id: manifest.id,
version: manifest.version,
kibanaVersion: manifest.kibanaVersion || manifest.version,
serviceFolders: manifest.serviceFolders || [],
requiredPlugins: isValidDepsDeclaration(manifest.requiredPlugins, 'requiredPlugins'),
optionalPlugins: isValidDepsDeclaration(manifest.optionalPlugins, 'optionalPlugins'),
requiredBundles: isValidDepsDeclaration(manifest.requiredBundles, 'requiredBundles'),
Expand Down
Loading

0 comments on commit 5ac9c3e

Please sign in to comment.