Skip to content

Commit

Permalink
Merge branch 'master' into np/elasticsearch-types
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticmachine authored Oct 7, 2019
2 parents 5273638 + dba0946 commit 58c12ac
Show file tree
Hide file tree
Showing 295 changed files with 6,143 additions and 2,405 deletions.
4 changes: 4 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ stage("Kibana Pipeline") { // This stage is just here to help the BlueOcean UI a
'oss-ciGroup4': getOssCiGroupWorker(4),
'oss-ciGroup5': getOssCiGroupWorker(5),
'oss-ciGroup6': getOssCiGroupWorker(6),
]),
'kibana-oss-agent2': withWorkers('kibana-oss-tests2', { buildOss() }, [
'oss-ciGroup7': getOssCiGroupWorker(7),
'oss-ciGroup8': getOssCiGroupWorker(8),
'oss-ciGroup9': getOssCiGroupWorker(9),
Expand All @@ -32,6 +34,8 @@ stage("Kibana Pipeline") { // This stage is just here to help the BlueOcean UI a
'xpack-ciGroup3': getXpackCiGroupWorker(3),
'xpack-ciGroup4': getXpackCiGroupWorker(4),
'xpack-ciGroup5': getXpackCiGroupWorker(5),
]),
'kibana-xpack-agent2': withWorkers('kibana-xpack-tests2', { buildXpack() }, [
'xpack-ciGroup6': getXpackCiGroupWorker(6),
'xpack-ciGroup7': getXpackCiGroupWorker(7),
'xpack-ciGroup8': getXpackCiGroupWorker(8),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,8 @@ core: {
notifications: NotificationsStart;
overlays: OverlayStart;
uiSettings: UiSettingsClientContract;
injectedMetadata: {
getInjectedVar: (name: string, defaultValue?: any) => unknown;
};
};
```
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ export interface AppMountContext

| Property | Type | Description |
| --- | --- | --- |
| [core](./kibana-plugin-public.appmountcontext.core.md) | <code>{</code><br/><code> application: Pick&lt;ApplicationStart, 'capabilities' &#124; 'navigateToApp'&gt;;</code><br/><code> chrome: ChromeStart;</code><br/><code> docLinks: DocLinksStart;</code><br/><code> http: HttpStart;</code><br/><code> i18n: I18nStart;</code><br/><code> notifications: NotificationsStart;</code><br/><code> overlays: OverlayStart;</code><br/><code> uiSettings: UiSettingsClientContract;</code><br/><code> }</code> | Core service APIs available to mounted applications. |
| [core](./kibana-plugin-public.appmountcontext.core.md) | <code>{</code><br/><code> application: Pick&lt;ApplicationStart, 'capabilities' &#124; 'navigateToApp'&gt;;</code><br/><code> chrome: ChromeStart;</code><br/><code> docLinks: DocLinksStart;</code><br/><code> http: HttpStart;</code><br/><code> i18n: I18nStart;</code><br/><code> notifications: NotificationsStart;</code><br/><code> overlays: OverlayStart;</code><br/><code> uiSettings: UiSettingsClientContract;</code><br/><code> injectedMetadata: {</code><br/><code> getInjectedVar: (name: string, defaultValue?: any) =&gt; unknown;</code><br/><code> };</code><br/><code> }</code> | Core service APIs available to mounted applications. |

Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [CoreSetup](./kibana-plugin-public.coresetup.md) &gt; [injectedMetadata](./kibana-plugin-public.coresetup.injectedmetadata.md)

## CoreSetup.injectedMetadata property

> Warning: This API is now obsolete.
>
>
exposed temporarily until https://github.com/elastic/kibana/issues/41990 done use \*only\* to retrieve config values. There is no way to set injected values in the new platform. Use the legacy platform API instead.

<b>Signature:</b>

```typescript
injectedMetadata: {
getInjectedVar: (name: string, defaultValue?: any) => unknown;
};
```
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export interface CoreSetup
| [context](./kibana-plugin-public.coresetup.context.md) | <code>ContextSetup</code> | [ContextSetup](./kibana-plugin-public.contextsetup.md) |
| [fatalErrors](./kibana-plugin-public.coresetup.fatalerrors.md) | <code>FatalErrorsSetup</code> | [FatalErrorsSetup](./kibana-plugin-public.fatalerrorssetup.md) |
| [http](./kibana-plugin-public.coresetup.http.md) | <code>HttpSetup</code> | [HttpSetup](./kibana-plugin-public.httpsetup.md) |
| [injectedMetadata](./kibana-plugin-public.coresetup.injectedmetadata.md) | <code>{</code><br/><code> getInjectedVar: (name: string, defaultValue?: any) =&gt; unknown;</code><br/><code> }</code> | exposed temporarily until https://github.com/elastic/kibana/issues/41990 done use \*only\* to retrieve config values. There is no way to set injected values in the new platform. Use the legacy platform API instead. |
| [notifications](./kibana-plugin-public.coresetup.notifications.md) | <code>NotificationsSetup</code> | [NotificationsSetup](./kibana-plugin-public.notificationssetup.md) |
| [uiSettings](./kibana-plugin-public.coresetup.uisettings.md) | <code>UiSettingsClientContract</code> | [UiSettingsClient](./kibana-plugin-public.uisettingsclient.md) |

Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [CoreStart](./kibana-plugin-public.corestart.md) &gt; [injectedMetadata](./kibana-plugin-public.corestart.injectedmetadata.md)

## CoreStart.injectedMetadata property

> Warning: This API is now obsolete.
>
>
exposed temporarily until https://github.com/elastic/kibana/issues/41990 done use \*only\* to retrieve config values. There is no way to set injected values in the new platform. Use the legacy platform API instead.

<b>Signature:</b>

```typescript
injectedMetadata: {
getInjectedVar: (name: string, defaultValue?: any) => unknown;
};
```
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export interface CoreStart
| [docLinks](./kibana-plugin-public.corestart.doclinks.md) | <code>DocLinksStart</code> | [DocLinksStart](./kibana-plugin-public.doclinksstart.md) |
| [http](./kibana-plugin-public.corestart.http.md) | <code>HttpStart</code> | [HttpStart](./kibana-plugin-public.httpstart.md) |
| [i18n](./kibana-plugin-public.corestart.i18n.md) | <code>I18nStart</code> | [I18nStart](./kibana-plugin-public.i18nstart.md) |
| [injectedMetadata](./kibana-plugin-public.corestart.injectedmetadata.md) | <code>{</code><br/><code> getInjectedVar: (name: string, defaultValue?: any) =&gt; unknown;</code><br/><code> }</code> | exposed temporarily until https://github.com/elastic/kibana/issues/41990 done use \*only\* to retrieve config values. There is no way to set injected values in the new platform. Use the legacy platform API instead. |
| [notifications](./kibana-plugin-public.corestart.notifications.md) | <code>NotificationsStart</code> | [NotificationsStart](./kibana-plugin-public.notificationsstart.md) |
| [overlays](./kibana-plugin-public.corestart.overlays.md) | <code>OverlayStart</code> | [OverlayStart](./kibana-plugin-public.overlaystart.md) |
| [savedObjects](./kibana-plugin-public.corestart.savedobjects.md) | <code>SavedObjectsStart</code> | [SavedObjectsStart](./kibana-plugin-public.savedobjectsstart.md) |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

## SavedObjectsExportOptions.exportSizeLimit property

the maximum number of objects to export.

<b>Signature:</b>

```typescript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

## SavedObjectsExportOptions.includeReferencesDeep property

flag to also include all related saved objects in the export response.

<b>Signature:</b>

```typescript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ export interface SavedObjectsExportOptions

| Property | Type | Description |
| --- | --- | --- |
| [exportSizeLimit](./kibana-plugin-server.savedobjectsexportoptions.exportsizelimit.md) | <code>number</code> | |
| [includeReferencesDeep](./kibana-plugin-server.savedobjectsexportoptions.includereferencesdeep.md) | <code>boolean</code> | |
| [namespace](./kibana-plugin-server.savedobjectsexportoptions.namespace.md) | <code>string</code> | |
| [objects](./kibana-plugin-server.savedobjectsexportoptions.objects.md) | <code>Array&lt;{</code><br/><code> id: string;</code><br/><code> type: string;</code><br/><code> }&gt;</code> | |
| [savedObjectsClient](./kibana-plugin-server.savedobjectsexportoptions.savedobjectsclient.md) | <code>SavedObjectsClientContract</code> | |
| [types](./kibana-plugin-server.savedobjectsexportoptions.types.md) | <code>string[]</code> | |
| [exportSizeLimit](./kibana-plugin-server.savedobjectsexportoptions.exportsizelimit.md) | <code>number</code> | the maximum number of objects to export. |
| [includeReferencesDeep](./kibana-plugin-server.savedobjectsexportoptions.includereferencesdeep.md) | <code>boolean</code> | flag to also include all related saved objects in the export response. |
| [namespace](./kibana-plugin-server.savedobjectsexportoptions.namespace.md) | <code>string</code> | optional namespace to override the namespace used by the savedObjectsClient. |
| [objects](./kibana-plugin-server.savedobjectsexportoptions.objects.md) | <code>Array&lt;{</code><br/><code> id: string;</code><br/><code> type: string;</code><br/><code> }&gt;</code> | optional array of objects to export. |
| [savedObjectsClient](./kibana-plugin-server.savedobjectsexportoptions.savedobjectsclient.md) | <code>SavedObjectsClientContract</code> | an instance of the SavedObjectsClient. |
| [search](./kibana-plugin-server.savedobjectsexportoptions.search.md) | <code>string</code> | optional query string to filter exported objects. |
| [types](./kibana-plugin-server.savedobjectsexportoptions.types.md) | <code>string[]</code> | optional array of saved object types. |

Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

## SavedObjectsExportOptions.namespace property

optional namespace to override the namespace used by the savedObjectsClient.

<b>Signature:</b>

```typescript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

## SavedObjectsExportOptions.objects property

optional array of objects to export.

<b>Signature:</b>

```typescript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

## SavedObjectsExportOptions.savedObjectsClient property

an instance of the SavedObjectsClient.

<b>Signature:</b>

```typescript
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-server](./kibana-plugin-server.md) &gt; [SavedObjectsExportOptions](./kibana-plugin-server.savedobjectsexportoptions.md) &gt; [search](./kibana-plugin-server.savedobjectsexportoptions.search.md)

## SavedObjectsExportOptions.search property

optional query string to filter exported objects.

<b>Signature:</b>

```typescript
search?: string;
```
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

## SavedObjectsExportOptions.types property

optional array of saved object types.

<b>Signature:</b>

```typescript
Expand Down
2 changes: 1 addition & 1 deletion docs/setup/settings.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ identifies this Kibana instance.
`server.port:`:: *Default: 5601* Kibana is served by a back end server. This
setting specifies the port to use.

`server.rewriteBasePath:`:: *Default: true* Specifies whether Kibana should
`server.rewriteBasePath:`:: *Default: false* Specifies whether Kibana should
rewrite requests that are prefixed with `server.basePath` or require that they
are rewritten by your reverse proxy.

Expand Down
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,6 @@
"markdown-it": "^8.4.1",
"mini-css-extract-plugin": "0.8.0",
"minimatch": "^3.0.4",
"mkdirp": "0.5.1",
"moment": "^2.20.1",
"moment-timezone": "^0.5.14",
"mustache": "2.3.2",
Expand Down Expand Up @@ -250,7 +249,7 @@
"tslib": "^1.9.3",
"type-detect": "^4.0.8",
"ui-select": "0.19.8",
"url-loader": "2.1.0",
"url-loader": "2.2.0",
"uuid": "3.3.2",
"val-loader": "^1.1.1",
"validate-npm-package-name": "2.2.2",
Expand All @@ -259,8 +258,8 @@
"vega-schema-url-parser": "1.0.0",
"vega-tooltip": "^0.9.14",
"vision": "^5.3.3",
"webpack": "4.39.2",
"webpack-merge": "4.2.1",
"webpack": "4.41.0",
"webpack-merge": "4.2.2",
"whatwg-fetch": "^3.0.0",
"yauzl": "2.10.0"
},
Expand Down Expand Up @@ -322,7 +321,6 @@
"@types/lru-cache": "^5.1.0",
"@types/markdown-it": "^0.0.7",
"@types/minimatch": "^2.0.29",
"@types/mkdirp": "^0.5.2",
"@types/mocha": "^5.2.7",
"@types/moment-timezone": "^0.5.8",
"@types/mustache": "^0.8.31",
Expand All @@ -340,14 +338,15 @@
"@types/redux-actions": "^2.2.1",
"@types/request": "^2.48.2",
"@types/rimraf": "^2.0.2",
"@types/selenium-webdriver": "^3.0.16",
"@types/selenium-webdriver": "^4.0.3",
"@types/semver": "^5.5.0",
"@types/sinon": "^7.0.13",
"@types/strip-ansi": "^3.0.0",
"@types/styled-components": "^3.0.2",
"@types/supertest": "^2.0.5",
"@types/type-detect": "^4.0.1",
"@types/uuid": "^3.4.4",
"@types/vinyl-fs": "^2.4.11",
"@types/zen-observable": "^0.8.0",
"@typescript-eslint/eslint-plugin": "1.13.0",
"@typescript-eslint/parser": "1.13.0",
Expand All @@ -360,7 +359,7 @@
"chai": "3.5.0",
"chance": "1.0.18",
"cheerio": "0.22.0",
"chokidar": "3.0.2",
"chokidar": "3.2.1",
"chromedriver": "^77.0.0",
"classnames": "2.2.6",
"dedent": "^0.7.0",
Expand Down Expand Up @@ -399,6 +398,7 @@
"gulp-babel": "^8.0.0",
"gulp-sourcemaps": "2.6.5",
"has-ansi": "^3.0.0",
"iedriver": "^3.14.1",
"image-diff": "1.6.3",
"intl-messageformat-parser": "^1.4.0",
"is-path-inside": "^2.1.0",
Expand Down Expand Up @@ -437,7 +437,7 @@
"proxyquire": "1.8.0",
"regenerate": "^1.4.0",
"sass-lint": "^1.12.1",
"selenium-webdriver": "^4.0.0-alpha.4",
"selenium-webdriver": "^4.0.0-alpha.5",
"simple-git": "1.116.0",
"sinon": "^7.4.2",
"strip-ansi": "^3.0.1",
Expand Down
5 changes: 5 additions & 0 deletions packages/eslint-config-kibana/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ module.exports = {
from: 'expect.js',
to: '@kbn/expect',
},
{
from: 'mkdirp',
to: false,
disallowedMessage: `Don't use 'mkdirp', use the new { recursive: true } option of Fs.mkdir instead`
},
{
from: 'x-pack',
toRelative: 'x-pack',
Expand Down
3 changes: 1 addition & 2 deletions packages/kbn-es/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"license": "Apache-2.0",
"private": true,
"dependencies": {
"@elastic/elasticsearch": "^7.3.0",
"@elastic/elasticsearch": "^7.4.0",
"@kbn/dev-utils": "1.0.0",
"abort-controller": "^2.0.3",
"chalk": "^2.4.2",
Expand All @@ -14,7 +14,6 @@
"execa": "^1.0.0",
"getopts": "^2.2.4",
"glob": "^7.1.2",
"mkdirp": "^0.5.1",
"node-fetch": "^2.6.0",
"simple-git": "^1.91.0",
"tar-fs": "^1.16.3",
Expand Down
4 changes: 2 additions & 2 deletions packages/kbn-es/src/artifact.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ const AbortController = require('abort-controller');
const fs = require('fs');
const { promisify } = require('util');
const { pipeline, Transform } = require('stream');
const mkdirp = require('mkdirp');
const chalk = require('chalk');
const { createHash } = require('crypto');
const path = require('path');
Expand Down Expand Up @@ -285,7 +284,8 @@ exports.Artifact = class Artifact {
let first500Bytes = Buffer.alloc(0);
let contentLength = 0;

mkdirp.sync(path.dirname(tmpPath));
fs.mkdirSync(path.dirname(tmpPath), { recursive: true });

await asyncPipeline(
resp.body,
new Transform({
Expand Down
3 changes: 1 addition & 2 deletions packages/kbn-es/src/cli_commands/build_snapshots.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ const { pipeline, Transform } = require('stream');
const Fs = require('fs');

const getopts = require('getopts');
const mkdirp = require('mkdirp');
const del = require('del');

const { buildSnapshot, log } = require('../utils');
Expand All @@ -49,7 +48,7 @@ exports.run = async (defaults = {}) => {

const outputDir = resolve(process.cwd(), options.output);
del.sync(outputDir);
mkdirp.sync(outputDir);
Fs.mkdirSync(outputDir, { recursive: true });

for (const license of ['oss', 'trial']) {
for (const platform of ['darwin', 'win32', 'linux']) {
Expand Down
3 changes: 1 addition & 2 deletions packages/kbn-es/src/utils/cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
*/

const fs = require('fs');
const mkdirp = require('mkdirp');
const path = require('path');

exports.readMeta = function readMeta(file) {
Expand Down Expand Up @@ -48,6 +47,6 @@ exports.writeMeta = function readMeta(file, details = {}) {
...details,
};

mkdirp.sync(path.dirname(file));
fs.mkdirSync(path.dirname(file), { recursive: true });
fs.writeFileSync(`${file}.meta`, JSON.stringify(meta, null, 2));
};
5 changes: 2 additions & 3 deletions packages/kbn-es/src/utils/decompress.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ const fs = require('fs');
const path = require('path');

const yauzl = require('yauzl');
const mkdirp = require('mkdirp');
const zlib = require('zlib');
const tarFs = require('tar-fs');

Expand All @@ -38,7 +37,7 @@ function decompressTarball(archive, dirPath) {
}

function decompressZip(input, output) {
mkdirp.sync(output);
fs.mkdirSync(output, { recursive: true });
return new Promise((resolve, reject) => {
yauzl.open(input, { lazyEntries: true }, (err, zipfile) => {
if (err) {
Expand All @@ -63,7 +62,7 @@ function decompressZip(input, output) {
const fileName = path.resolve(output, zipPath);

if (/\/$/.test(entry.fileName)) {
mkdirp.sync(fileName);
fs.mkdirSync(fileName, { recursive: true });
zipfile.readEntry();
} else {
// file entry
Expand Down
7 changes: 3 additions & 4 deletions packages/kbn-es/src/utils/decompress.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
const { decompress } = require('./decompress');
const fs = require('fs');
const path = require('path');
const mkdirp = require('mkdirp');
const del = require('del');
const os = require('os');

Expand All @@ -34,9 +33,9 @@ const zipSnapshot = path.resolve(dataFolder, 'snapshot.zip');
const tarGzSnapshot = path.resolve(dataFolder, 'snapshot.tar.gz');

beforeEach(() => {
mkdirp.sync(tmpFolder);
mkdirp.sync(dataFolder);
mkdirp.sync(esFolder);
fs.mkdirSync(tmpFolder, { recursive: true });
fs.mkdirSync(dataFolder, { recursive: true });
fs.mkdirSync(esFolder, { recursive: true });

fs.copyFileSync(path.resolve(fixturesFolder, 'snapshot.zip'), zipSnapshot);
fs.copyFileSync(path.resolve(fixturesFolder, 'snapshot.tar.gz'), tarGzSnapshot);
Expand Down
Loading

0 comments on commit 58c12ac

Please sign in to comment.