Skip to content

Commit

Permalink
dist
Browse files Browse the repository at this point in the history
  • Loading branch information
patrykkopycinski committed May 22, 2020
1 parent 87c30a4 commit a8c3c94
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 45 deletions.
30 changes: 15 additions & 15 deletions packages/kbn-pm/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4859,7 +4859,7 @@ class ProcRunner {
this.closing = false;
this.procs = [];
this.signalUnsubscribe = exit_hook_1.default(() => {
this.teardown().catch(error => {
this.teardown().catch((error) => {
log.error(`ProcRunner teardown error: ${error.stack}`);
});
});
Expand Down Expand Up @@ -4898,7 +4898,7 @@ class ProcRunner {
try {
if (wait instanceof RegExp) {
// wait for process to log matching line
await Rx.race(proc.lines$.pipe(operators_1.filter(line => wait.test(line)), operators_1.first(), operators_1.catchError(err => {
await Rx.race(proc.lines$.pipe(operators_1.filter((line) => wait.test(line)), operators_1.first(), operators_1.catchError((err) => {
if (err.name !== 'EmptyError') {
throw errors_1.createCliError(`[${name}] exited without matching pattern: ${wait}`);
}
Expand Down Expand Up @@ -4943,7 +4943,7 @@ class ProcRunner {
* @return {Promise<undefined>}
*/
async waitForAllToStop() {
await Promise.all(this.procs.map(proc => proc.outcomePromise));
await Promise.all(this.procs.map((proc) => proc.outcomePromise));
}
/**
* Close the ProcRunner and stop all running
Expand All @@ -4959,14 +4959,14 @@ class ProcRunner {
this.closing = true;
this.signalUnsubscribe();
if (!signal && this.procs.length > 0) {
this.log.warning('%d processes left running, stop them with procs.stop(name):', this.procs.length, this.procs.map(proc => proc.name));
this.log.warning('%d processes left running, stop them with procs.stop(name):', this.procs.length, this.procs.map((proc) => proc.name));
}
await Promise.all(this.procs.map(async (proc) => {
await proc.stop(signal === 'exit' ? 'SIGKILL' : signal);
}));
}
getProc(name) {
return this.procs.find(proc => {
return this.procs.find((proc) => {
return proc.name === name;
});
}
Expand All @@ -4979,14 +4979,14 @@ class ProcRunner {
};
// tie into proc outcome$, remove from _procs on compete
proc.outcome$.subscribe({
next: code => {
next: (code) => {
const duration = moment_1.default.duration(Date.now() - startMs);
this.log.info('[%s] exited with %s after %s', name, code, duration.humanize());
},
complete: () => {
remove();
},
error: error => {
error: (error) => {
if (this.closing) {
this.log.error(error);
}
Expand Down Expand Up @@ -33630,8 +33630,8 @@ function startProc(name, options, log) {
return code;
})),
// observe first error event
Rx.fromEvent(childProcess, 'error').pipe(operators_1.take(1), operators_1.mergeMap(err => Rx.throwError(err)))).pipe(operators_1.share());
const lines$ = Rx.merge(observe_lines_1.observeLines(childProcess.stdout), observe_lines_1.observeLines(childProcess.stderr)).pipe(operators_1.tap(line => log.write(` ${chalk_1.default.gray('proc')} [${chalk_1.default.gray(name)}] ${line}`)), operators_1.share());
Rx.fromEvent(childProcess, 'error').pipe(operators_1.take(1), operators_1.mergeMap((err) => Rx.throwError(err)))).pipe(operators_1.share());
const lines$ = Rx.merge(observe_lines_1.observeLines(childProcess.stdout), observe_lines_1.observeLines(childProcess.stderr)).pipe(operators_1.tap((line) => log.write(` ${chalk_1.default.gray('proc')} [${chalk_1.default.gray(name)}] ${line}`)), operators_1.share());
const outcomePromise = Rx.merge(lines$.pipe(operators_1.ignoreElements()), outcome$).toPromise();
async function stop(signal) {
if (stopCalled) {
Expand Down Expand Up @@ -36615,7 +36615,7 @@ const operators_1 = __webpack_require__(270);
* - fails on the first "error" event
*/
function observeReadable(readable) {
return Rx.race(Rx.fromEvent(readable, 'end').pipe(operators_1.first(), operators_1.ignoreElements()), Rx.fromEvent(readable, 'error').pipe(operators_1.first(), operators_1.mergeMap(err => Rx.throwError(err))));
return Rx.race(Rx.fromEvent(readable, 'end').pipe(operators_1.first(), operators_1.ignoreElements()), Rx.fromEvent(readable, 'error').pipe(operators_1.first(), operators_1.mergeMap((err) => Rx.throwError(err))));
}
exports.observeReadable = observeReadable;

Expand Down Expand Up @@ -36925,7 +36925,7 @@ class ToolingLogCollectingWriter extends tooling_log_text_writer_1.ToolingLogTex
super({
level: 'verbose',
writeTo: {
write: msg => {
write: (msg) => {
// trim trailing new line
this.messages.push(msg.slice(0, -1));
},
Expand Down Expand Up @@ -39506,7 +39506,7 @@ async function run(fn, options = {}) {
level: tooling_log_1.pickLevelFromFlags(flags),
writeTo: process.stdout,
});
process.on('unhandledRejection', error => {
process.on('unhandledRejection', (error) => {
log.error('UNHANDLED PROMISE REJECTION');
log.error(error instanceof Error
? error
Expand Down Expand Up @@ -39620,7 +39620,7 @@ function combineErrors(errors) {
const exitCode = errors
.filter(isFailError)
.reduce((acc, error) => Math.max(acc, error.exitCode), 1);
const showHelp = errors.some(error => isFailError(error) && error.showHelp);
const showHelp = errors.some((error) => isFailError(error) && error.showHelp);
const message = errors.reduce((acc, error) => {
if (isFailError(error)) {
return acc + '\n' + error.message;
Expand Down Expand Up @@ -40122,7 +40122,7 @@ exports.uriencode = (strings, ...values) => {
return queue.reduce((acc, string, i) => `${acc}${encodeURIComponent(values[i])}${string}`, leadingString);
};
const DEFAULT_MAX_ATTEMPTS = 5;
const delay = (ms) => new Promise(resolve => {
const delay = (ms) => new Promise((resolve) => {
setTimeout(resolve, ms);
});
class KbnClientRequester {
Expand Down Expand Up @@ -44015,7 +44015,7 @@ class CiStatsReporter {
const reason = ((_d = (_c = error) === null || _c === void 0 ? void 0 : _c.response) === null || _d === void 0 ? void 0 : _d.status) ? `${error.response.status} response`
: 'no response';
this.log.warning(`failed to reach kibana-ci-stats service [reason=${reason}], retrying in ${attempt} seconds`);
await new Promise(resolve => setTimeout(resolve, attempt * 1000));
await new Promise((resolve) => setTimeout(resolve, attempt * 1000));
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/dev/jest/setup/react_testing_library.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

import '@testing-library/jest-dom/extend-expect';
import '@testing-library/jest-dom';
/**
* Have to import "/pure" here to not register afterEach() hook clean up
* in the very beginning. There are couple tests which fail with clean up hook.
Expand Down
2 changes: 1 addition & 1 deletion x-pack/dev-tools/jest/setup/setup_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
*/

import 'jest-styled-components';
import '@testing-library/jest-dom/extend-expect';
import '@testing-library/jest-dom';
3 changes: 2 additions & 1 deletion x-pack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"@storybook/theming": "^5.2.6",
"@testing-library/react": "^9.3.2",
"@testing-library/react-hooks": "^3.2.1",
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/jest-dom": "^5.8.0",
"@types/angular": "^1.6.56",
"@types/archiver": "^3.0.0",
"@types/base64-js": "^1.2.5",
Expand Down Expand Up @@ -108,6 +108,7 @@
"@types/styled-components": "^5.1.0",
"@types/supertest": "^2.0.5",
"@types/tar-fs": "^1.16.1",
"@types/testing-library__jest-dom": "^5.7.0",
"@types/tinycolor2": "^1.4.1",
"@types/use-resize-observer": "^6.0.0",
"@types/uuid": "^3.4.4",
Expand Down
4 changes: 2 additions & 2 deletions x-pack/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"plugins/**/*",
"test_utils/**/*",
"tasks/**/*",
"../node_modules/@testing-library/jest-dom/extend-expect.d.ts"
],
"exclude": [
"test/**/*",
Expand Down Expand Up @@ -43,7 +42,8 @@
"node",
"jest",
"flot",
"jest-styled-components"
"jest-styled-components",
"@testing-library/jest-dom"
]
}
}
50 changes: 25 additions & 25 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1143,13 +1143,6 @@
dependencies:
regenerator-runtime "^0.13.4"

"@babel/runtime@^7.5.1":
version "7.9.6"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.9.6.tgz#a9102eb5cadedf3f31d08a9ecf294af7827ea29f"
integrity sha512-64AF1xY3OAkFHqOb9s4jpgk1Mm5vDZ4L3acHvAml+53nO1XbXLuDodsVpO4OIUsmemlUHMxNdYMNJmsvOwLrvQ==
dependencies:
regenerator-runtime "^0.13.4"

"@babel/template@^7.0.0", "@babel/template@^7.3.3", "@babel/template@^7.4.4", "@babel/template@^7.7.4", "@babel/template@^7.8.3", "@babel/template@^7.8.6":
version "7.8.6"
resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.8.6.tgz#86b22af15f828dfb086474f964dcc3e39c43ce2b"
Expand Down Expand Up @@ -3633,19 +3626,19 @@
pretty-format "^24.9.0"
wait-for-expect "^3.0.0"

"@testing-library/jest-dom@^4.2.4":
version "4.2.4"
resolved "https://registry.yarnpkg.com/@testing-library/jest-dom/-/jest-dom-4.2.4.tgz#00dfa0cbdd837d9a3c2a7f3f0a248ea6e7b89742"
integrity sha512-j31Bn0rQo12fhCWOUWy9fl7wtqkp7In/YP2p5ZFyRuiiB9Qs3g+hS4gAmDWONbAHcRmVooNJ5eOHQDCOmUFXHg==
"@testing-library/jest-dom@^5.8.0":
version "5.8.0"
resolved "https://registry.yarnpkg.com/@testing-library/jest-dom/-/jest-dom-5.8.0.tgz#815e830129c4dda6c8e9a725046397acec523669"
integrity sha512-9Y4FxYIxfwHpUyJVqI8EOfDP2LlEBqKwXE3F+V8ightji0M2rzQB+9kqZ5UJxNs+9oXJIgvYj7T3QaXLNHVDMw==
dependencies:
"@babel/runtime" "^7.5.1"
chalk "^2.4.1"
css "^2.2.3"
"@babel/runtime" "^7.9.2"
"@types/testing-library__jest-dom" "^5.0.2"
chalk "^3.0.0"
css "^2.2.4"
css.escape "^1.5.1"
jest-diff "^24.0.0"
jest-matcher-utils "^24.0.0"
lodash "^4.17.11"
pretty-format "^24.0.0"
jest-diff "^25.1.0"
jest-matcher-utils "^25.1.0"
lodash "^4.17.15"
redent "^3.0.0"

"@testing-library/react-hooks@^3.2.1":
Expand Down Expand Up @@ -4359,7 +4352,7 @@
"@types/istanbul-lib-coverage" "*"
"@types/istanbul-lib-report" "*"

"@types/jest@^25.2.3":
"@types/jest@*", "@types/jest@^25.2.3":
version "25.2.3"
resolved "https://registry.yarnpkg.com/@types/jest/-/jest-25.2.3.tgz#33d27e4c4716caae4eced355097a47ad363fdcaf"
integrity sha512-JXc1nK/tXHiDhV55dvfzqtmP4S3sy3T3ouV2tkViZgxY/zeUkcpQcQPGRlgF4KmWzWW5oiWYSZwtCB+2RsE4Fw==
Expand Down Expand Up @@ -5099,6 +5092,13 @@
dependencies:
pretty-format "^24.3.0"

"@types/testing-library__jest-dom@^5.0.2", "@types/testing-library__jest-dom@^5.7.0":
version "5.7.0"
resolved "https://registry.yarnpkg.com/@types/testing-library__jest-dom/-/testing-library__jest-dom-5.7.0.tgz#078790bf4dc89152a74428591a228ec5f9433251"
integrity sha512-LoZ3uonlnAbJUz4bg6UoeFl+frfndXngmkCItSjJ8DD5WlRfVqPC5/LgJASsY/dy7AHH2YJ7PcsdASOydcVeFA==
dependencies:
"@types/jest" "*"

"@types/testing-library__react-hooks@^3.0.0", "@types/testing-library__react-hooks@^3.1.0":
version "3.1.0"
resolved "https://registry.yarnpkg.com/@types/testing-library__react-hooks/-/testing-library__react-hooks-3.1.0.tgz#04d174ce767fbcce3ccb5021d7f156e1b06008a9"
Expand Down Expand Up @@ -10561,7 +10561,7 @@ css.escape@^1.5.1:
resolved "https://registry.yarnpkg.com/css.escape/-/css.escape-1.5.1.tgz#42e27d4fa04ae32f931a4b4d4191fa9cddee97cb"
integrity sha1-QuJ9T6BK4y+TGktNQZH6nN3ul8s=

css@2.X, css@^2.0.0, css@^2.2.1, css@^2.2.3, css@^2.2.4:
css@2.X, css@^2.0.0, css@^2.2.1, css@^2.2.4:
version "2.2.4"
resolved "https://registry.yarnpkg.com/css/-/css-2.2.4.tgz#c646755c73971f2bba6a601e2cf2fd71b1298929"
integrity sha512-oUnjmWpy0niI3x/mPL8dVEI1l7MnG3+HHyRPHf+YFSbK+svOhXpmSOcDURUh2aOCgl2grzrOPt1nHLuCVFULLw==
Expand Down Expand Up @@ -18218,7 +18218,7 @@ jest-config@^25.5.4:
pretty-format "^25.5.0"
realpath-native "^2.0.0"

jest-diff@^24.0.0, jest-diff@^24.9.0:
jest-diff@^24.9.0:
version "24.9.0"
resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-24.9.0.tgz#931b7d0d5778a1baf7452cb816e325e3724055da"
integrity sha512-qMfrTs8AdJE2iqrTp0hzh7kTd2PQWrsFyj9tORoKmu32xjPjeE4NyjVRDz8ybYwqS2ik8N4hsIpiVTyFeo2lBQ==
Expand All @@ -18228,7 +18228,7 @@ jest-diff@^24.0.0, jest-diff@^24.9.0:
jest-get-type "^24.9.0"
pretty-format "^24.9.0"

jest-diff@^25.2.1, jest-diff@^25.5.0:
jest-diff@^25.1.0, jest-diff@^25.2.1, jest-diff@^25.5.0:
version "25.5.0"
resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-25.5.0.tgz#1dd26ed64f96667c068cef026b677dfa01afcfa9"
integrity sha512-z1kygetuPiREYdNIumRpAHY6RXiGmp70YHptjdaxTWGmA085W3iCnXNx0DhflK3vwrKmrRWyY1wUpkPMVxMK7A==
Expand Down Expand Up @@ -18370,7 +18370,7 @@ jest-leak-detector@^25.5.0:
jest-get-type "^25.2.6"
pretty-format "^25.5.0"

jest-matcher-utils@^24.0.0, jest-matcher-utils@^24.9.0:
jest-matcher-utils@^24.9.0:
version "24.9.0"
resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-24.9.0.tgz#f5b3661d5e628dffe6dd65251dfdae0e87c3a073"
integrity sha512-OZz2IXsu6eaiMAwe67c1T+5tUAtQyQx27/EMEkbFAGiw52tB9em+uGbzpcgYVpA8wl0hlxKPZxrly4CXU/GjHA==
Expand All @@ -18380,7 +18380,7 @@ jest-matcher-utils@^24.0.0, jest-matcher-utils@^24.9.0:
jest-get-type "^24.9.0"
pretty-format "^24.9.0"

jest-matcher-utils@^25.5.0:
jest-matcher-utils@^25.1.0, jest-matcher-utils@^25.5.0:
version "25.5.0"
resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-25.5.0.tgz#fbc98a12d730e5d2453d7f1ed4a4d948e34b7867"
integrity sha512-VWI269+9JS5cpndnpCwm7dy7JtGQT30UHfrnM3mXl22gHGt/b7NkjBqXfbhZ8V4B7ANUsjK18PlSBmG0YH7gjw==
Expand Down Expand Up @@ -23755,7 +23755,7 @@ pretty-error@^2.1.1:
renderkid "^2.0.1"
utila "~0.4"

pretty-format@^24.0.0, pretty-format@^24.3.0, pretty-format@^24.9.0:
pretty-format@^24.3.0, pretty-format@^24.9.0:
version "24.9.0"
resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-24.9.0.tgz#12fac31b37019a4eea3c11aa9a959eb7628aa7c9"
integrity sha512-00ZMZUiHaJrNfk33guavqgvfJS30sLYf0f8+Srklv0AMPodGGHcoHgksZ3OThYnIvOd+8yMCn0YiEOogjlgsnA==
Expand Down

0 comments on commit a8c3c94

Please sign in to comment.