Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Code] fixed some type errors #32751

Merged
merged 1 commit into from
Mar 8, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15,078 changes: 5,895 additions & 9,183 deletions packages/kbn-pm/dist/index.js

Large diffs are not rendered by default.

7 changes: 3 additions & 4 deletions src/dev/build/tasks/patch_native_modules_task.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import { scanCopy, untar, deleteAll } from '../lib';
import { createWriteStream } from 'fs';
import binaryInfo from '../../../../x-pack/plugins/code/tasks/nodegit_info';
import { binaryInfo } from '../../../../x-pack/plugins/code/tasks/nodegit_info';
import wreck from 'wreck';
import mkdirp from 'mkdirp';
import { dirname, join, basename } from 'path';
Expand Down Expand Up @@ -61,9 +61,8 @@ async function downloadAndExtractTarball(url, dest, log, retry) {
async function patchNodeGit(config, log, build, platform) {
const plat = platform.isWindows() ? 'win32' : platform.getName();
const arch = platform.getNodeArch().split('-')[1];
const info = binaryInfo(plat, arch);
const downloadUrl = info.hosted_tarball;
const packageName = info.package_name;
const { downloadUrl, packageName } = binaryInfo(plat, arch);

const downloadPath = build.resolvePathForPlatform(platform, '.nodegit_binaries', packageName);
const extractDir = await downloadAndExtractTarball(downloadUrl, downloadPath, log, 3);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,13 +180,13 @@ const LanguageServerInstruction = (props: {
<EuiText grow={false}>
<h3>Install</h3>
<p>
Stop your kibana Code node, then use the following command to install ${props.name}{' '}
Stop your kibana Code node, then use the following command to install {props.name}{' '}
Language Server plugin:
<EuiCodeBlock language="shell">{installCode}</EuiCodeBlock>
</p>
<h3>Uninstall</h3>
<p>
Stop your kibana Code node, then use the following command to remove ${props.name}{' '}
Stop your kibana Code node, then use the following command to remove {props.name}{' '}
Language Server plugin:
<pre>
<code>bin/kibana-plugin remove {props.pluginName}</code>
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/code/public/components/main/content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ class CodeContent extends React.PureComponent<Props> {
};

public renderButtons = () => {
let buttonId = null;
let buttonId: string | undefined;
switch (this.props.match.params.pathType) {
case PathTypes.blame:
buttonId = ButtonOption.Blame;
Expand Down
12 changes: 12 additions & 0 deletions x-pack/plugins/code/public/components/search_page/side_bar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ export class SideBar extends React.PureComponent<Props> {
onClick={this.props.onRepositoryFilterToggled(item.name)}
quantity={item.value}
isSelected={true}
buttonRef={() => {
/* nothing */
}}
>
{RepositoryUtils.repoNameFromUri(item.name)}
</FacetItem>
Expand All @@ -67,6 +70,9 @@ export class SideBar extends React.PureComponent<Props> {
key={`repostats${index}`}
onClick={this.props.onRepositoryFilterToggled(item.name)}
quantity={item.value}
buttonRef={() => {
/* nothing */
}}
>
{RepositoryUtils.repoNameFromUri(item.name)}
</FacetItem>
Expand All @@ -83,6 +89,9 @@ export class SideBar extends React.PureComponent<Props> {
quantity={item.value}
isSelected={true}
data-test-subj="codeSearchLanguageFilterItem"
buttonRef={() => {
/* nothing */
}}
>
{item.name}
</FacetItem>
Expand All @@ -94,6 +103,9 @@ export class SideBar extends React.PureComponent<Props> {
onClick={this.props.onLanguageFilterToggled(item.name)}
quantity={item.value}
data-test-subj="codeSearchLanguageFilterItem"
buttonRef={() => {
/* nothing */
}}
>
{item.name}
</FacetItem>
Expand Down
1 change: 0 additions & 1 deletion x-pack/plugins/code/public/monaco/monaco.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
import convert from 'color-convert';
// (1) Desired editor features:
import 'monaco-editor/esm/vs/editor/browser/controller/coreCommands.js';
import 'monaco-editor/esm/vs/editor/browser/widget/codeEditorWidget.js';
Expand Down
8 changes: 0 additions & 8 deletions x-pack/plugins/code/tasks/nodegit_info.js

This file was deleted.

17 changes: 17 additions & 0 deletions x-pack/plugins/code/tasks/nodegit_info.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
// @ts-ignore
import binary_info from '@elastic/nodegit/dist/utils/binary_info';

export function binaryInfo(platform: string, arch: string) {
const info = binary_info(platform, arch);
const downloadUrl = info.hosted_tarball;
const packageName = info.package_name;
return {
downloadUrl,
packageName,
};
}