Skip to content

Commit

Permalink
Merge branch 'master' into saved_search_job_tests
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticmachine authored Oct 6, 2019
2 parents a2f63aa + 2389fe8 commit b265bd9
Show file tree
Hide file tree
Showing 294 changed files with 6,783 additions and 3,322 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
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
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
"dependencies": {
"@babel/core": "^7.5.5",
"@babel/register": "^7.5.5",
"@elastic/charts": "^12.0.2",
"@elastic/charts": "^12.1.0",
"@elastic/datemath": "5.0.2",
"@elastic/eui": "14.4.0",
"@elastic/filesaver": "1.1.2",
Expand Down 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 @@ -348,6 +346,7 @@
"@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
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
3 changes: 1 addition & 2 deletions packages/kbn-es/src/utils/extract_config_files.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

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

/**
* Copies config references to an absolute path to
Expand Down Expand Up @@ -62,7 +61,7 @@ function copyFileSync(src, dest) {
const destPath = path.dirname(dest);

if (!fs.existsSync(destPath)) {
mkdirp(destPath);
fs.mkdirSync(destPath, { recursive: true });
}

fs.writeFileSync(dest, fs.readFileSync(src));
Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-eslint-import-resolver-kibana/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
"glob-all": "^3.1.0",
"lru-cache": "^4.1.5",
"resolve": "^1.7.1",
"webpack": "^4.39.2"
"webpack": "^4.41.0"
}
}
20 changes: 19 additions & 1 deletion packages/kbn-eslint-plugin-eslint/rules/module_migration.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@ function checkModuleNameNode(context, mappings, node) {

let newSource;

if (mapping.to === false) {
context.report({
message: mapping.disallowedMessage || `Importing "${mapping.from}" is not allowed`,
loc: node.loc,
});
return;
}

// support for toRelative added to migrate away from X-Pack being bundled
// within node modules. after that migration, this can be removed.
if (mapping.toRelative) {
Expand Down Expand Up @@ -66,11 +74,21 @@ module.exports = {
type: 'string',
},
to: {
type: 'string',
anyOf: [
{
type: 'string',
},
{
const: false,
},
],
},
toRelative: {
type: 'string',
},
disallowedMessage: {
type: 'string',
},
},
anyOf: [
{
Expand Down
6 changes: 3 additions & 3 deletions packages/kbn-interpreter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
"sass-loader": "^7.3.1",
"style-loader": "0.23.1",
"supports-color": "^7.0.0",
"url-loader": "2.1.0",
"webpack": "4.39.2",
"webpack-cli": "^3.3.7"
"url-loader": "2.2.0",
"webpack": "4.41.0",
"webpack-cli": "^3.3.9"
}
}
26 changes: 26 additions & 0 deletions packages/kbn-plugin-helpers/lib/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

export function babelRegister(): void;
export function resolveKibanaPath(path: string): string;
export function readFtrConfigFile(path: string): any;
export function run(
task: 'build' | 'start' | 'testAll' | 'testBrowser' | 'testServer' | 'postinstall',
options: any
): Promise<void>;
Loading

0 comments on commit b265bd9

Please sign in to comment.