[6.8] Use @commercial/hapi (#97605)

This commit is contained in:
Thomas Watson 2021-06-29 16:57:46 +02:00 committed by GitHub
parent d72ee43808
commit 0997f4e783
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
237 changed files with 701 additions and 507 deletions

View file

@ -127,20 +127,20 @@
]
},
"dependencies": {
"@commercial/boom": "^7.4.12",
"@commercial/hapi": "^17.9.4",
"@commercial/hoek": "^6.2.5",
"@commercial/podium": "^3.4.3",
"@elastic/datemath": "5.0.2",
"@elastic/eui": "6.10.9",
"@elastic/filesaver": "1.1.2",
"@elastic/good": "8.1.1-kibana2",
"@elastic/numeral": "2.3.2",
"@elastic/ui-ace": "0.2.3",
"@hapi/boom": "^7.4.11",
"@hapi/good-squeeze": "^6.0.0",
"@hapi/h2o2": "^8.3.2",
"@hapi/hapi": "^17.9.0",
"@hapi/hoek": "^6.2.4",
"@hapi/inert": "^5.2.2",
"@hapi/oppsy": "^2.1.2",
"@hapi/podium": "^3.4.3",
"@hapi/vision": "^5.5.4",
"@hapi/wreck": "^16.0.1",
"@kbn/babel-code-parser": "1.0.0",
@ -300,6 +300,10 @@
"@types/bluebird": "^3.1.1",
"@types/chance": "^1.0.0",
"@types/classnames": "^2.2.3",
"@types/commercial__boom": "npm:@types/hapi__boom@^7.4.1",
"@types/commercial__hapi": "npm:@types/hapi@17.8.9",
"@types/commercial__hoek": "npm:@types/hapi__hoek@^6.2.0",
"@types/commercial__podium": "npm:@types/hapi__podium@^3.4.1",
"@types/d3": "^3.5.41",
"@types/dedent": "^0.7.0",
"@types/del": "^3.0.1",
@ -313,10 +317,6 @@
"@types/glob": "^5.0.35",
"@types/globby": "^8.0.0",
"@types/graphql": "^0.13.1",
"@types/hapi__boom": "^7.4.1",
"@types/hapi__hapi": "npm:@types/hapi@17.8.9",
"@types/hapi__hoek": "^6.2.0",
"@types/hapi__podium": "^3.4.1",
"@types/has-ansi": "^3.0.0",
"@types/humps": "^1.1.2",
"@types/jest": "^23.3.1",

View file

@ -17,7 +17,7 @@
* under the License.
*/
import { Server } from '@hapi/hapi';
import { Server } from '@commercial/hapi';
import { ByteSizeValue } from '@kbn/config-schema';
import { Agent as HttpsAgent, ServerOptions as TlsOptions } from 'https';
import { sample } from 'lodash';

View file

@ -17,7 +17,7 @@
* under the License.
*/
import { Server, ServerOptions } from '@hapi/hapi';
import { Server, ServerOptions } from '@commercial/hapi';
import { modifyUrl } from '../../utils';
import { Logger } from '../logging';

View file

@ -17,7 +17,7 @@
* under the License.
*/
import { Request, ResponseToolkit } from '@hapi/hapi';
import { Request, ResponseToolkit } from '@commercial/hapi';
import Joi from 'joi';
import { defaultValidationErrorHandler, HapiValidationError } from './http_tools';

View file

@ -17,8 +17,8 @@
* under the License.
*/
import { Lifecycle, Request, ResponseToolkit, Server, ServerOptions, Util } from '@hapi/hapi';
import Hoek from '@hapi/hoek';
import { Lifecycle, Request, ResponseToolkit, Server, ServerOptions, Util } from '@commercial/hapi';
import Hoek from '@commercial/hoek';
import { readFileSync } from 'fs';
import { ServerOptions as TLSOptions } from 'https';
import { ValidationError } from 'joi';

View file

@ -17,7 +17,7 @@
* under the License.
*/
import { Request, ResponseToolkit, Server } from '@hapi/hapi';
import { Request, ResponseToolkit, Server } from '@commercial/hapi';
import { format as formatUrl } from 'url';
import { Logger } from '../logging';

View file

@ -17,7 +17,7 @@
* under the License.
*/
import { Request } from '@hapi/hapi';
import { Request } from '@commercial/hapi';
import { ObjectType, TypeOf } from '@kbn/config-schema';
import { filterHeaders, Headers } from './headers';

View file

@ -17,7 +17,7 @@
* under the License.
*/
import { Request, ResponseObject, ResponseToolkit } from '@hapi/hapi';
import { Request, ResponseObject, ResponseToolkit } from '@commercial/hapi';
import { ObjectType, schema, TypeOf } from '@kbn/config-schema';
import { KibanaRequest } from './request';

View file

@ -17,7 +17,7 @@
* under the License.
*/
import { Server as HapiServer } from '@hapi/hapi';
import { Server as HapiServer } from '@commercial/hapi';
import { combineLatest, ConnectableObservable, EMPTY, Subscription } from 'rxjs';
import { first, map, mergeMap, publishReplay, tap } from 'rxjs/operators';
import { CoreContext, CoreService } from '../../types';

View file

@ -17,8 +17,8 @@
* under the License.
*/
import { ServerExtType } from '@hapi/hapi';
import Podium from '@hapi/podium';
import { ServerExtType } from '@commercial/hapi';
import Podium from '@commercial/podium';
// @ts-ignore: implicit any for JS file
import { Config, transformDeprecations } from '../../../../server/config';
// @ts-ignore: implicit any for JS file

View file

@ -50,6 +50,7 @@ import {
TranspileBabelTask,
TranspileTypescriptTask,
TranspileScssTask,
UpdateHapiCommercialLicenseTask,
UpdateLicenseFileTask,
VerifyEnvTask,
VerifyExistingNodeBuildsTask,
@ -114,6 +115,7 @@ export async function buildDistributables(options) {
await run(RemoveWorkspacesTask);
await run(CleanTypescriptTask);
await run(CleanPackagesTask);
await run(UpdateHapiCommercialLicenseTask);
await run(CreateNoticeFileTask);
await run(UpdateLicenseFileTask);
await run(RemovePackageJsonDepsTask);

View file

@ -0,0 +1,46 @@
/*
* 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.
*/
import { join } from 'path';
import { promises as fs } from 'fs';
import { getInstalledPackages } from '../../../npm';
export const UpdateHapiCommercialLicenseTask = {
description: 'Updating packages in the @commercial namespace with custom LICENSE file',
async run(config, log, build) {
log.info('Finding installed production packages in the @commercial namespace');
const packages = (await getInstalledPackages({ directory: build.resolvePath() }))
.filter((pkg) => pkg.name.startsWith('@commercial/'));
return Promise.all(
packages.map(async ({ directory }) => await addNewLicense(directory, log))
);
}
};
async function addNewLicense(packageDirectory, log) {
const oldPath = join(packageDirectory, 'LICENSE.md');
log.info(`Deleting old license at ${oldPath}`);
await fs.unlink(oldPath);
const templatePath = join(__dirname, 'license_template');
const newPath = join(packageDirectory, 'LICENSE');
log.info(`Adding new license at ${newPath}`);
await fs.copyFile(templatePath, newPath);
}

View file

@ -0,0 +1,32 @@
Sideway Inc. grants Elasticsearch B.V. and its subsidiaries a perpetual,
nonexclusive license to the Covered Software under the 3-Clause BSD License
(https://opensource.org/licenses/BSD-3-Clause) license as follows:
Copyright 2012-2020 Sideway Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of Sideway Inc. nor the names of its contributors may be
used toendorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY SIDEWAY INC. "AS IS" AND ANY EXPRESS
OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SIDEWAY INC. BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.

View file

@ -25,6 +25,7 @@ export * from './create_archives_task';
export * from './create_empty_dirs_and_files_task';
export * from './create_package_json_task';
export * from './create_readme_task';
export * from './hapi_commercial_license';
export * from './install_dependencies_task';
export * from './license_file_task';
export * from './nodejs';

View file

@ -79,6 +79,40 @@ export const LICENSE_OVERRIDES = {
'jsts@1.1.2': ['Eclipse Distribution License - v 1.0'], //cf. https://github.com/bjornharrtell/jsts
'@mapbox/jsonlint-lines-primitives@2.0.2': ['MIT'], //license in readme https://github.com/tmcw/jsonlint
// Override for the commercial hapi license
'@commercial/accept@3.2.4': ['BSD-3-Clause'],
'@commercial/ammo@3.1.2': ['BSD-3-Clause'],
'@commercial/b64@4.2.1': ['BSD-3-Clause'],
'@commercial/boom@7.4.12': ['BSD-3-Clause'],
'@commercial/bounce@1.3.2': ['BSD-3-Clause'],
'@commercial/bourne@1.3.2': ['BSD-3-Clause'],
'@commercial/call@5.1.3': ['BSD-3-Clause'],
'@commercial/catbox-memory@3.2.2': ['BSD-3-Clause'],
'@commercial/catbox@10.2.3': ['BSD-3-Clause'],
'@commercial/content@4.1.1': ['BSD-3-Clause'],
'@commercial/cryptiles@4.2.1': ['BSD-3-Clause'],
'@commercial/file@1.0.0': ['BSD-3-Clause'],
'@commercial/formula@1.2.0': ['BSD-3-Clause'],
'@commercial/hapi@17.9.4': ['BSD-3-Clause'],
'@commercial/heavy@6.2.2': ['BSD-3-Clause'],
'@commercial/hoek@6.2.5': ['BSD-3-Clause'],
'@commercial/hoek@8.5.1': ['BSD-3-Clause'],
'@commercial/iron@5.1.4': ['BSD-3-Clause'],
'@commercial/joi@15.1.1': ['BSD-3-Clause'],
'@commercial/joi@16.1.8': ['BSD-3-Clause'],
'@commercial/mimos@4.1.1': ['BSD-3-Clause'],
'@commercial/nigel@3.1.1': ['BSD-3-Clause'],
'@commercial/pez@4.1.2': ['BSD-3-Clause'],
'@commercial/pinpoint@1.0.2': ['BSD-3-Clause'],
'@commercial/podium@3.4.3': ['BSD-3-Clause'],
'@commercial/somever@2.1.1': ['BSD-3-Clause'],
'@commercial/statehood@6.1.2': ['BSD-3-Clause'],
'@commercial/subtext@6.1.3': ['BSD-3-Clause'],
'@commercial/teamwork@3.3.1': ['BSD-3-Clause'],
'@commercial/topo@3.1.6': ['BSD-3-Clause'],
'@commercial/vise@3.1.1': ['BSD-3-Clause'],
'@commercial/wreck@15.1.0': ['BSD-3-Clause'],
// TODO can be removed once we upgrade past elasticsearch-browser@14.0.0
'elasticsearch-browser@13.0.1': ['Apache-2.0'],

View file

@ -17,7 +17,7 @@
* under the License.
*/
import Boom from '@hapi/boom';
import Boom from '@commercial/boom';
import { resolve, join, sep } from 'path';
import url from 'url';
import { has, isEmpty, head } from 'lodash';

View file

@ -20,7 +20,7 @@
import sinon from 'sinon';
import Wreck from '@hapi/wreck';
import expect from 'expect.js';
import { Server } from '@hapi/hapi';
import { Server } from '@commercial/hapi';
import { createProxyRoute } from '../../';

View file

@ -22,7 +22,7 @@ import { request } from 'http';
import sinon from 'sinon';
import Wreck from '@hapi/wreck';
import expect from 'expect.js';
import { Server } from '@hapi/hapi';
import { Server } from '@commercial/hapi';
import { createProxyRoute } from '../../';

View file

@ -22,7 +22,7 @@ import { Agent } from 'http';
import sinon from 'sinon';
import Wreck from '@hapi/wreck';
import expect from 'expect.js';
import { Server } from '@hapi/hapi';
import { Server } from '@commercial/hapi';
import { createProxyRoute } from '../../';

View file

@ -20,7 +20,7 @@
import sinon from 'sinon';
import Wreck from '@hapi/wreck';
import expect from 'expect.js';
import { Server } from '@hapi/hapi';
import { Server } from '@commercial/hapi';
import { createProxyRoute } from '../../';

View file

@ -18,7 +18,7 @@
*/
import Joi from 'joi';
import Boom from '@hapi/boom';
import Boom from '@commercial/boom';
import Wreck from '@hapi/wreck';
import { trimLeft, trimRight } from 'lodash';

View file

@ -21,7 +21,7 @@ import expect from 'expect.js';
import { createClusters } from '../create_clusters';
import sinon from 'sinon';
import { partial } from 'lodash';
import Hapi from '@hapi/hapi';
import Hapi from '@commercial/hapi';
import * as ClusterNS from '../cluster';

View file

@ -20,7 +20,7 @@
import elasticsearch from 'elasticsearch';
import { get, set, isEmpty, cloneDeep, pick } from 'lodash';
import toPath from 'lodash/internal/toPath';
import Boom from '@hapi/boom';
import Boom from '@commercial/boom';
import filterHeaders from './filter_headers';
import { parseConfig } from './parse_config';

View file

@ -17,7 +17,7 @@
* under the License.
*/
import Boom from '@hapi/boom';
import Boom from '@commercial/boom';
import { serializeProvider } from '@kbn/interpreter/common';
import { API_ROUTE } from '../../common/constants';
import { createHandlers } from '../lib/create_handlers';

View file

@ -17,7 +17,7 @@
* under the License.
*/
import Boom from '@hapi/boom';
import Boom from '@commercial/boom';
import _ from 'lodash';
import { errors as esErrors } from 'elasticsearch';

View file

@ -18,7 +18,7 @@
*/
import { exportDashboards } from '../../../lib/export/export_dashboards';
import Boom from '@hapi/boom';
import Boom from '@commercial/boom';
import Joi from 'joi';
import moment from 'moment';
export function exportApi(server) {

View file

@ -17,7 +17,7 @@
* under the License.
*/
import Boom from '@hapi/boom';
import Boom from '@commercial/boom';
import Joi from 'joi';
import { importDashboards } from '../../../lib/import/import_dashboards';

View file

@ -18,7 +18,7 @@
*/
import Joi from 'joi';
import Boom from '@hapi/boom';
import Boom from '@commercial/boom';
export function registerKqlTelemetryApi(server) {
server.route({

View file

@ -17,7 +17,7 @@
* under the License.
*/
import Boom from '@hapi/boom';
import Boom from '@commercial/boom';
import Joi from 'joi';
import { findRelationships } from '../../../../lib/management/saved_objects/relationships';
import { isNotFoundError } from '../../../../../../../../server/saved_objects/service/lib/errors';

View file

@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import Hapi from '@hapi/hapi';
import Hapi from '@commercial/hapi';
import { registerScrollForExportRoute } from './scroll';
const createMockServer = () => {

View file

@ -18,7 +18,7 @@
*/
import getVisData from '../lib/get_vis_data';
import Boom from '@hapi/boom';
import Boom from '@commercial/boom';
export default (server) => {
server.route({

View file

@ -19,7 +19,7 @@
import { writeFile } from 'fs';
import os from 'os';
import Boom from '@hapi/boom';
import Boom from '@commercial/boom';
import MiniCssExtractPlugin from 'mini-css-extract-plugin';
import TerserPlugin from 'terser-webpack-plugin';
import webpack from 'webpack';

View file

@ -23,7 +23,7 @@ import crypto from 'crypto';
import Chance from 'chance';
import expect from 'expect.js';
import Hapi from '@hapi/hapi';
import Hapi from '@commercial/hapi';
import Inert from '@hapi/inert';
import sinon from 'sinon';

View file

@ -20,7 +20,7 @@
import { resolve } from 'path';
import { open, fstat, createReadStream, close } from 'fs';
import Boom from '@hapi/boom';
import Boom from '@commercial/boom';
import { fromNode as fcb } from 'bluebird';
import { getFileHash } from './file_hash';

View file

@ -18,7 +18,7 @@
*/
import { Server } from '@hapi/hapi';
import { Server } from '@commercial/hapi';
import { registerHapiPlugins } from '../../server/http/register_hapi_plugins';
export default class WatchServer {

View file

@ -20,8 +20,8 @@
import { format } from 'url';
import { resolve } from 'path';
import _ from 'lodash';
import Boom from '@hapi/boom';
import Hapi from '@hapi/hapi';
import Boom from '@commercial/boom';
import Hapi from '@commercial/hapi';
import { setupVersionCheck } from './version_check';
import { registerHapiPlugins } from './register_hapi_plugins';
import { setupBasePathProvider } from './setup_base_path_provider';

View file

@ -17,7 +17,7 @@
* under the License.
*/
import { badRequest } from '@hapi/boom';
import { badRequest } from '@commercial/boom';
export function setupVersionCheck(server, config) {
const versionHeader = 'kbn-version';

View file

@ -17,7 +17,7 @@
* under the License.
*/
import { badRequest } from '@hapi/boom';
import { badRequest } from '@commercial/boom';
export function setupXsrf(server, config) {
const disabled = config.get('server.xsrf.disableProtection');

View file

@ -17,7 +17,7 @@
* under the License.
*/
import Boom from '@hapi/boom';
import Boom from '@commercial/boom';
import { get } from 'lodash';
const ERR_ES_INDEX_NOT_FOUND = 'index_not_found_exception';

View file

@ -17,7 +17,7 @@
* under the License.
*/
import { Server } from '@hapi/hapi';
import { Server } from '@commercial/hapi';
import { CallClusterWithRequest, ElasticsearchPlugin } from '../legacy/core_plugins/elasticsearch';
import { IndexPatternsServiceFactory } from './index_patterns';
@ -28,7 +28,7 @@ export interface KibanaConfig {
}
// Extend the defaults with the plugins and server methods we need.
declare module '@hapi/hapi' {
declare module '@commercial/hapi' {
interface PluginProperties {
elasticsearch: ElasticsearchPlugin;
kibana: any;
@ -65,7 +65,7 @@ export default class KbnServer {
}
// Re-export commonly used hapi types.
export { Server, Request, ResponseToolkit } from '@hapi/hapi';
export { Server, Request, ResponseToolkit } from '@commercial/hapi';
// Re-export commonly accessed api types.
export { IndexPatternsService } from './index_patterns';

View file

@ -18,7 +18,7 @@
*/
import _ from 'lodash';
import Boom from '@hapi/boom';
import Boom from '@commercial/boom';
import Promise from 'bluebird';
import { unlinkSync as unlink } from 'fs';
const writeFile = Promise.promisify(require('fs').writeFile);

View file

@ -17,7 +17,7 @@
* under the License.
*/
import Boom from '@hapi/boom';
import Boom from '@commercial/boom';
import Joi from 'joi';
import { loadData } from './lib/load_data';

View file

@ -60,7 +60,7 @@
* given an empty migrationVersion property {} if no such property exists.
*/
import Boom from '@hapi/boom';
import Boom from '@commercial/boom';
import _ from 'lodash';
import Semver from 'semver';
import { MigrationVersion, SavedObjectDoc } from '../../serialization';

View file

@ -17,7 +17,7 @@
* under the License.
*/
import Hapi from '@hapi/hapi';
import Hapi from '@commercial/hapi';
import { defaultValidationErrorHandler } from '../../../core/server/http/http_tools';
const defaultConfig = {

View file

@ -17,7 +17,7 @@
* under the License.
*/
import Boom from '@hapi/boom';
import Boom from '@commercial/boom';
const code = Symbol('SavedObjectsClientErrorCode');

View file

@ -17,7 +17,7 @@
* under the License.
*/
import Boom from '@hapi/boom';
import Boom from '@commercial/boom';
import {
decorateBadRequestError,

View file

@ -17,7 +17,7 @@
* under the License.
*/
import Boom from '@hapi/boom';
import Boom from '@commercial/boom';
import { getQueryParams } from './query_params';
import { getSortingParams } from './sorting_params';

View file

@ -17,7 +17,7 @@
* under the License.
*/
import Boom from '@hapi/boom';
import Boom from '@commercial/boom';
import { getProperty } from '../../../../mappings';

View file

@ -17,7 +17,7 @@
* under the License.
*/
import Boom from '@hapi/boom';
import Boom from '@commercial/boom';
import { decodeVersion } from './decode_version';

View file

@ -18,7 +18,7 @@
*/
import Joi from 'joi';
import boom from '@hapi/boom';
import boom from '@commercial/boom';
import { i18n } from '@kbn/i18n';
import { wrapAuthConfig } from '../../wrap_auth_config';
import { KIBANA_STATS_TYPE } from '../../constants';

View file

@ -19,7 +19,7 @@
import { parse } from 'url';
import { trim } from 'lodash';
import Boom from '@hapi/boom';
import Boom from '@commercial/boom';
export function shortUrlAssertValid(url) {
const { protocol, hostname, pathname } = parse(url);

View file

@ -17,7 +17,7 @@
* under the License.
*/
import Boom from '@hapi/boom';
import Boom from '@commercial/boom';
export function handleShortUrlError(error) {
return Boom.boomify(error, {

View file

@ -19,7 +19,7 @@
import { createHash } from 'crypto';
import { props, reduce as reduceAsync } from 'bluebird';
import Boom from '@hapi/boom';
import Boom from '@commercial/boom';
import { resolve } from 'path';
import { i18n } from '@kbn/i18n';
import { AppBootstrap } from './bootstrap';

View file

@ -18,7 +18,7 @@
*/
import { defaultsDeep } from 'lodash';
import Boom from '@hapi/boom';
import Boom from '@commercial/boom';
import { createOrUpgradeSavedConfig } from './create_or_upgrade_saved_config';

View file

@ -19,7 +19,7 @@
import expect from 'expect.js';
import { errors as esErrors } from 'elasticsearch';
import Boom from '@hapi/boom';
import Boom from '@commercial/boom';
import {
isEsIndexNotFoundError,

View file

@ -26,7 +26,7 @@
"@types/react": "16.3.14"
},
"devDependencies": {
"@hapi/hapi": "^17.9.0",
"@commercial/hapi": "^17.9.4",
"@kbn/dev-utils": "1.0.0",
"@kbn/es": "1.0.0",
"@kbn/plugin-helpers": "7.1.5",
@ -114,14 +114,14 @@
"yargs": "4.8.1"
},
"dependencies": {
"@commercial/boom": "^7.4.12",
"@commercial/statehood": "^6.1.2",
"@elastic/datemath": "5.0.2",
"@elastic/eui": "6.10.9",
"@elastic/node-crypto": "0.1.2",
"@elastic/node-phantom-simple": "2.2.4",
"@elastic/numeral": "2.3.2",
"@hapi/boom": "^7.4.11",
"@hapi/oppsy": "^2.1.2",
"@hapi/statehood": "^6.1.2",
"@kbn/babel-preset": "1.0.0",
"@kbn/es-query": "1.0.0",
"@kbn/i18n": "1.0.0",

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { Server } from '@hapi/hapi';
import { Server } from '@commercial/hapi';
import { countBy } from 'lodash';
// Support telemetry for additional agent types by appending definitions in

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { Server } from '@hapi/hapi';
import { Server } from '@commercial/hapi';
import {
APM_TELEMETRY_DOC_ID,
ApmTelemetry,

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { Server } from '@hapi/hapi';
import { Server } from '@commercial/hapi';
import { flatten } from 'lodash';
// @ts-ignore
import { initErrorsApi } from '../errors';

View file

@ -5,7 +5,7 @@
*/
import Joi from 'joi';
import Boom from '@hapi/boom';
import Boom from '@commercial/boom';
import { getDistribution } from '../lib/errors/distribution/get_distribution';
import { getErrorGroups } from '../lib/errors/get_error_groups';

View file

@ -4,8 +4,8 @@
* you may not use this file except in compliance with the Elastic License.
*/
import Boom from '@hapi/boom';
import { Server } from '@hapi/hapi';
import Boom from '@commercial/boom';
import { Server } from '@commercial/hapi';
import { withDefaultValidators } from '../lib/helpers/input_validation';
import { setupRequest } from '../lib/helpers/setup_request';
import { getAllMetricsChartData } from '../lib/metrics/get_all_metrics_chart_data';

View file

@ -4,8 +4,8 @@
* you may not use this file except in compliance with the Elastic License.
*/
import Boom from '@hapi/boom';
import { Server } from '@hapi/hapi';
import Boom from '@commercial/boom';
import { Server } from '@commercial/hapi';
import {
AgentName,
createApmTelementry,

View file

@ -5,7 +5,7 @@
*/
import Joi from 'joi';
import Boom from '@hapi/boom';
import Boom from '@commercial/boom';
import { getServerStatus } from '../lib/status_check/server_check';
import { getAgentStatus } from '../lib/status_check/agent_check';
import { setupRequest } from '../lib/helpers/setup_request';

View file

@ -4,8 +4,8 @@
* you may not use this file except in compliance with the Elastic License.
*/
import Boom from '@hapi/boom';
import { Server } from '@hapi/hapi';
import Boom from '@commercial/boom';
import { Server } from '@commercial/hapi';
import { withDefaultValidators } from '../lib/helpers/input_validation';
import { setupRequest } from '../lib/helpers/setup_request';
import { getTopTraces } from '../lib/traces/get_top_traces';

View file

@ -4,8 +4,8 @@
* you may not use this file except in compliance with the Elastic License.
*/
import Boom from '@hapi/boom';
import { Server } from '@hapi/hapi';
import Boom from '@commercial/boom';
import { Server } from '@commercial/hapi';
import Joi from 'joi';
import { withDefaultValidators } from '../lib/helpers/input_validation';
import { setupRequest } from '../lib/helpers/setup_request';

View file

@ -4,8 +4,8 @@
* you may not use this file except in compliance with the Elastic License.
*/
import Boom from '@hapi/boom';
import { Server } from '@hapi/hapi';
import Boom from '@commercial/boom';
import { Server } from '@commercial/hapi';
import Joi from 'joi';
import { withDefaultValidators } from '../lib/helpers/input_validation';
import { setupRequest } from '../lib/helpers/setup_request';

View file

@ -3,7 +3,7 @@
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
import { Lifecycle, ResponseToolkit } from '@hapi/hapi';
import { Lifecycle, ResponseToolkit } from '@commercial/hapi';
import * as t from 'io-ts';
import { LicenseType } from '../../../../common/constants/security';

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { ResponseToolkit } from '@hapi/hapi';
import { ResponseToolkit } from '@commercial/hapi';
import { PathReporter } from 'io-ts/lib/PathReporter';
import { get } from 'lodash';
// @ts-ignore

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import Boom from '@hapi/boom';
import Boom from '@commercial/boom';
import { difference } from 'lodash';
import {
BackendFrameworkAdapter,

View file

@ -4,9 +4,9 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { badRequest } from '@hapi/boom';
import { badRequest } from '@commercial/boom';
// @ts-ignore
import Hapi from '@hapi/hapi';
import Hapi from '@commercial/hapi';
import { readFile } from 'fs';
import { resolve } from 'path';
import { promisify } from 'util';

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import Boom from '@hapi/boom';
import Boom from '@commercial/boom';
import Joi from 'joi';
import { get } from 'lodash';
import { REQUIRED_LICENSES } from '../../../common/constants/security';

View file

@ -5,7 +5,7 @@
*/
// @ts-ignore
import Boom from '@hapi/boom';
import Boom from '@commercial/boom';
/**
* Wraps ES errors into a Boom error response and returns it

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import boom from '@hapi/boom';
import boom from '@commercial/boom';
import {
CANVAS_TYPE,
API_ROUTE_WORKPAD,

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import Hapi from '@hapi/hapi';
import Hapi from '@commercial/hapi';
import {
CANVAS_TYPE,
API_ROUTE_WORKPAD,

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { Server } from '@hapi/hapi';
import { Server } from '@commercial/hapi';
import { KIBANA_CLOUD_STATS_TYPE } from './constants';
export interface UsageStats {

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import Boom from '@hapi/boom';
import Boom from '@commercial/boom';
/**
* Wraps a custom error into a Boom error response and returns it

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import Boom from '@hapi/boom';
import Boom from '@commercial/boom';
function extractCausedByChain(causedBy = {}, accumulator = []) {
const { reason, caused_by } = causedBy; // eslint-disable-line camelcase

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import Boom from '@hapi/boom';
import Boom from '@commercial/boom';
/**
* Wraps an unknown error into a Boom error response and returns it

View file

@ -3,7 +3,7 @@
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
import Boom from '@hapi/boom';
import Boom from '@commercial/boom';
import { callWithRequestFactory } from '../../lib/call_with_request_factory';
import { isEsErrorFactory } from '../../lib/is_es_error_factory';
import { wrapEsError, wrapUnknownError } from '../../lib/error_wrappers';

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import Boom from '@hapi/boom';
import Boom from '@commercial/boom';
import { callWithRequestFactory } from '../../lib/call_with_request_factory';
import { isEsErrorFactory } from '../../lib/is_es_error_factory';

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import Boom from '@hapi/boom';
import Boom from '@commercial/boom';
import { callWithRequestFactory } from '../../lib/call_with_request_factory';
import { isEsErrorFactory } from '../../lib/is_es_error_factory';
import { wrapEsError, wrapUnknownError } from '../../lib/error_wrappers';

View file

@ -5,7 +5,7 @@
*/
import expect from 'expect.js';
import Hapi from '@hapi/hapi';
import Hapi from '@commercial/hapi';
import Chance from 'chance';
import { createDashboardModeRequestInterceptor } from '../dashboard_mode_request_interceptor';

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import Boom from '@hapi/boom';
import Boom from '@commercial/boom';
import {
AUTH_SCOPE_DASHBORD_ONLY_MODE

View file

@ -5,7 +5,7 @@
*/
import { resolve } from 'path';
import Boom from '@hapi/boom';
import Boom from '@commercial/boom';
import { initServer } from './server';
import mappings from './mappings.json';

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import Boom from '@hapi/boom';
import Boom from '@commercial/boom';
import { mirrorPluginStatus } from '../../../server/lib/mirror_plugin_status';
import { checkLicense } from './lib';

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import Boom from '@hapi/boom';
import Boom from '@commercial/boom';
import { get } from 'lodash';
export async function callEsGraphExploreApi({ callCluster, index, query }) {

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import Boom from '@hapi/boom';
import Boom from '@commercial/boom';
export async function callEsSearchApi({ callCluster, index, body, queryParams }) {
try {

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import Boom from '@hapi/boom';
import Boom from '@commercial/boom';
export function verifyApiAccessPre(request, h) {
const xpackInfo = request.server.plugins.xpack_main.info;

View file

@ -5,7 +5,7 @@
*/
import Joi from 'joi';
import Boom from '@hapi/boom';
import Boom from '@commercial/boom';
import {
verifyApiAccessPre,

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import Boom from '@hapi/boom';
import Boom from '@commercial/boom';
/**
* Wraps ES errors into a Boom error response and returns it

View file

@ -5,7 +5,7 @@
*/
import expect from 'expect.js';
import Boom from '@hapi/boom';
import Boom from '@commercial/boom';
import { licensePreRoutingFactory } from '../license_pre_routing_factory';
describe('license_pre_routing_factory', () => {

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import Boom from '@hapi/boom';
import Boom from '@commercial/boom';
import { PLUGIN } from '../../../common/constants';
export const licensePreRoutingFactory = (server) => {

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import Boom from '@hapi/boom';
import Boom from '@commercial/boom';
/**
* Wraps a custom error into a Boom error response and returns it

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import Boom from '@hapi/boom';
import Boom from '@commercial/boom';
/**
* Wraps an error thrown by the ES JS client into a Boom error response and returns it

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import Boom from '@hapi/boom';
import Boom from '@commercial/boom';
/**
* Wraps an unknown error into a Boom error response and returns it

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import Boom from '@hapi/boom';
import Boom from '@commercial/boom';
/**
* Wraps a custom error into a Boom error response and returns it

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import Boom from '@hapi/boom';
import Boom from '@commercial/boom';
/**
* Wraps an error thrown by the ES JS client into a Boom error response and returns it

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import Boom from '@hapi/boom';
import Boom from '@commercial/boom';
/**
* Wraps an unknown error into a Boom error response and returns it

View file

@ -8,11 +8,11 @@
"build-graphql-types": "node scripts/generate_types_from_graphql.js"
},
"devDependencies": {
"@types/hapi__boom": "^7.4.1",
"@types/commercial__boom": "npm:@types/hapi__boom@^7.4.1",
"@types/lodash": "^4.14.110"
},
"dependencies": {
"@hapi/boom": "^7.4.11",
"@commercial/boom": "^7.4.12",
"@types/color": "^3.0.0",
"lodash": "^4.17.21"
}

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { Server } from '@hapi/hapi';
import { Server } from '@commercial/hapi';
import JoiNamespace from 'joi';
import { initInfraServer } from './infra_server';
import { compose } from './lib/compose/kibana';

Some files were not shown because too many files have changed in this diff Show more