Skip to content

Commit

Permalink
[6.8] Upgrade from wreck v14.2.0 to @hapi/wreck v16.0.1 (#99508)
Browse files Browse the repository at this point in the history
  • Loading branch information
watson authored May 19, 2021
1 parent a726f59 commit 2a63875
Show file tree
Hide file tree
Showing 12 changed files with 34 additions and 13 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@
"@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",
"@kbn/babel-preset": "1.0.0",
"@kbn/config-schema": "1.0.0",
Expand Down Expand Up @@ -279,7 +280,6 @@
"webpack": "4.26.1",
"webpack-merge": "4.1.4",
"whatwg-fetch": "^3.0.0",
"wreck": "^14.2.0",
"x-pack": "6.8.16",
"yauzl": "2.7.0"
},
Expand Down
2 changes: 1 addition & 1 deletion src/cli_plugin/install/downloaders/http.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

import Wreck from 'wreck';
import Wreck from '@hapi/wreck';
import Progress from '../progress';
import { createWriteStream } from 'fs';
import HttpProxyAgent from 'http-proxy-agent';
Expand Down
2 changes: 1 addition & 1 deletion src/dev/build/lib/__tests__/download.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import { readFileSync } from 'fs';
import del from 'del';
import sinon from 'sinon';
import expect from 'expect.js';
import Wreck from 'wreck';
import Wreck from '@hapi/wreck';

import { ToolingLog } from '@kbn/dev-utils';
import { download } from '../download';
Expand Down
9 changes: 7 additions & 2 deletions src/es_archiver/lib/indices/kibana_index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import fs from 'fs';
import path from 'path';
import { promisify } from 'util';
import { toArray } from 'rxjs/operators';
import wreck from 'wreck';
import wreck from '@hapi/wreck';

import { deleteIndex } from './delete_index';
import { collectUiExports } from '../../../ui/ui_exports';
Expand Down Expand Up @@ -124,7 +124,12 @@ export async function isSpacesEnabled({ kibanaUrl }) {

async function getKibanaStatuses({ kibanaUrl }) {
try {
const { payload } = await wreck.get('/api/status', {
// Workaround for breaking change introduced in Wreck v15 regarding URL parsing (see https://github.com/hapijs/wreck/issues/244)
if (!kibanaUrl.endsWith('/')) {
kibanaUrl += '/';
}

const { payload } = await wreck.get('api/status', {
baseUrl: kibanaUrl,
json: true
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

import sinon from 'sinon';
import Wreck from 'wreck';
import Wreck from '@hapi/wreck';
import expect from 'expect.js';
import { Server } from 'hapi';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import { request } from 'http';

import sinon from 'sinon';
import Wreck from 'wreck';
import Wreck from '@hapi/wreck';
import expect from 'expect.js';
import { Server } from 'hapi';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import { Agent } from 'http';

import sinon from 'sinon';
import Wreck from 'wreck';
import Wreck from '@hapi/wreck';
import expect from 'expect.js';
import { Server } from 'hapi';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

import sinon from 'sinon';
import Wreck from 'wreck';
import Wreck from '@hapi/wreck';
import expect from 'expect.js';
import { Server } from 'hapi';

Expand Down
2 changes: 1 addition & 1 deletion src/legacy/core_plugins/console/server/proxy_route.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import Joi from 'joi';
import Boom from '@hapi/boom';
import Wreck from 'wreck';
import Wreck from '@hapi/wreck';
import { trimLeft, trimRight } from 'lodash';

function resolveUri(base, path) {
Expand Down
2 changes: 1 addition & 1 deletion test/common/services/kibana_server/status.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import { resolve as resolveUrl } from 'url';

import Wreck from 'wreck';
import Wreck from '@hapi/wreck';

const get = async (url) => {
const { payload } = await Wreck.get(url, { json: 'force' });
Expand Down
2 changes: 1 addition & 1 deletion test/common/services/kibana_server/ui_settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

import Wreck from 'wreck';
import Wreck from '@hapi/wreck';
import { get } from 'lodash';

const MINUTE = 60 * 1000;
Expand Down
18 changes: 17 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -853,6 +853,13 @@
dependencies:
"@hapi/hoek" "8.x.x"

"@hapi/[email protected]":
version "8.0.1"
resolved "https://registry.yarnpkg.com/@hapi/boom/-/boom-8.0.1.tgz#13f1f2f2a3abfb0787c79e35e238c8aff6aa1661"
integrity sha512-SnBM2GzEYEA6AGFKXBqNLWXR3uNBui0bkmklYXX1gYtevVhDTy2uakwkSauxvIWMtlANGRhzChYg95If3FWCwA==
dependencies:
"@hapi/hoek" "8.x.x"

"@hapi/[email protected]":
version "1.3.2"
resolved "https://registry.yarnpkg.com/@hapi/bounce/-/bounce-1.3.2.tgz#3b096bb02f67de6115e6e4f0debc390be5a86bad"
Expand Down Expand Up @@ -985,6 +992,15 @@
"@hapi/hoek" "8.x.x"
"@hapi/joi" "16.x.x"

"@hapi/wreck@^16.0.1":
version "16.0.1"
resolved "https://registry.yarnpkg.com/@hapi/wreck/-/wreck-16.0.1.tgz#95cd013b8166db17be88837d6d0a880d8e7cd6b3"
integrity sha512-fL6IwZ5nk1jBMLBPugt72u23rw8KnnyupLor7TZihgvAXTulxJprUe9YiCLuGbKsEBh2qDo31ixvLCSaxC2+xQ==
dependencies:
"@hapi/boom" "8.x.x"
"@hapi/bourne" "1.x.x"
"@hapi/hoek" "8.x.x"

"@mapbox/[email protected]":
version "0.2.2"
resolved "https://registry.yarnpkg.com/@mapbox/geojson-area/-/geojson-area-0.2.2.tgz#18d7814aa36bf23fbbcc379f8e26a22927debf10"
Expand Down Expand Up @@ -22996,7 +23012,7 @@ wrappy@1:
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=

[email protected], wreck@^14.2.0:
[email protected]:
version "14.2.0"
resolved "https://registry.yarnpkg.com/wreck/-/wreck-14.2.0.tgz#0064a5b930fc675f57830c1fd28342da1a70b0fc"
integrity sha512-NFFft3SMgqrJbXEVfYifh+QDWFxni+98/I7ut7rLbz3F0XOypluHsdo3mdEYssGSirMobM3fGlqhyikbWKDn2Q==
Expand Down

0 comments on commit 2a63875

Please sign in to comment.