From 35a344ce8a32312beff05fb16285e5399d1e334d Mon Sep 17 00:00:00 2001 From: Greg Magolan Date: Fri, 19 Jul 2019 10:18:13 -0400 Subject: [PATCH] feat(protractor): add protractor rule Copied over from angular/angular repo under packages/bazel --- .bazelci/presubmit.yml | 4 + .circleci/config.yml | 8 + WORKSPACE | 16 + commitlint.config.js | 1 + examples/app/BUILD.bazel | 30 +- examples/app/WORKSPACE | 15 + .../app/{app_e2e_test.ts => app.e2e-spec.ts} | 0 examples/app/package.json | 12 +- examples/app/protractor.conf.js | 7 - examples/app/protractor.on-prepare.js | 23 + examples/app/yarn.lock | 254 +------- package.json | 1 + packages/protractor/BUILD.bazel | 51 ++ packages/protractor/docs/BUILD.bazel | 50 ++ packages/protractor/docs/docs_test.js | 6 + packages/protractor/docs/install.md | 16 + packages/protractor/src/BUILD.bazel | 59 ++ packages/protractor/src/WORKSPACE | 15 + .../protractor/src/browser_repositories.bzl | 114 ++++ packages/protractor/src/defaults.bzl | 47 ++ packages/protractor/src/index.bzl | 27 + packages/protractor/src/package.bzl | 38 ++ packages/protractor/src/package.json | 27 + packages/protractor/src/protractor-utils.ts | 119 ++++ packages/protractor/src/protractor.conf.js | 188 ++++++ packages/protractor/src/protractor.js | 3 + .../protractor/src/protractor_web_test.bzl | 366 +++++++++++ packages/protractor/src/tsconfig.json | 7 + .../protractor/test/protractor-2/BUILD.bazel | 76 +++ packages/protractor/test/protractor-2/app.ts | 21 + packages/protractor/test/protractor-2/conf.js | 22 + .../protractor/test/protractor-2/index.html | 9 + .../test/protractor-2/on-prepare.js | 31 + .../protractor/test/protractor-2/test.spec.ts | 35 ++ .../test/protractor-2/tsconfig-test.json | 6 + .../test/protractor-2/tsconfig.json | 6 + .../test/protractor-utils/BUILD.bazel | 32 + .../test/protractor-utils/fake-devserver.js | 32 + .../test/protractor-utils/index_test.ts | 27 + .../protractor/test/protractor/BUILD.bazel | 36 ++ packages/protractor/test/protractor/conf.ts | 43 ++ .../protractor/test/protractor/test.spec.ts | 27 + .../protractor/test/protractor/tsconfig.json | 6 + scripts/packages.sh | 2 +- yarn.lock | 586 +++++++++++++++++- 45 files changed, 2213 insertions(+), 288 deletions(-) rename examples/app/{app_e2e_test.ts => app.e2e-spec.ts} (100%) delete mode 100644 examples/app/protractor.conf.js create mode 100644 examples/app/protractor.on-prepare.js create mode 100644 packages/protractor/BUILD.bazel create mode 100644 packages/protractor/docs/BUILD.bazel create mode 100644 packages/protractor/docs/docs_test.js create mode 100644 packages/protractor/docs/install.md create mode 100644 packages/protractor/src/BUILD.bazel create mode 100644 packages/protractor/src/WORKSPACE create mode 100644 packages/protractor/src/browser_repositories.bzl create mode 100644 packages/protractor/src/defaults.bzl create mode 100644 packages/protractor/src/index.bzl create mode 100644 packages/protractor/src/package.bzl create mode 100644 packages/protractor/src/package.json create mode 100644 packages/protractor/src/protractor-utils.ts create mode 100644 packages/protractor/src/protractor.conf.js create mode 100644 packages/protractor/src/protractor.js create mode 100644 packages/protractor/src/protractor_web_test.bzl create mode 100644 packages/protractor/src/tsconfig.json create mode 100644 packages/protractor/test/protractor-2/BUILD.bazel create mode 100644 packages/protractor/test/protractor-2/app.ts create mode 100644 packages/protractor/test/protractor-2/conf.js create mode 100644 packages/protractor/test/protractor-2/index.html create mode 100644 packages/protractor/test/protractor-2/on-prepare.js create mode 100644 packages/protractor/test/protractor-2/test.spec.ts create mode 100644 packages/protractor/test/protractor-2/tsconfig-test.json create mode 100644 packages/protractor/test/protractor-2/tsconfig.json create mode 100644 packages/protractor/test/protractor-utils/BUILD.bazel create mode 100644 packages/protractor/test/protractor-utils/fake-devserver.js create mode 100644 packages/protractor/test/protractor-utils/index_test.ts create mode 100644 packages/protractor/test/protractor/BUILD.bazel create mode 100644 packages/protractor/test/protractor/conf.ts create mode 100644 packages/protractor/test/protractor/test.spec.ts create mode 100644 packages/protractor/test/protractor/tsconfig.json diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 8cd658882f..fd2765ddd7 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -17,6 +17,8 @@ tasks: - "@bazel_workspace_b//subdir:bin" build_targets: - "//..." + test_flags: + - "--test_tag_filters=-fix-bazelci-ubuntu" test_targets: - "//..." ubuntu1804: @@ -39,6 +41,8 @@ tasks: # This target is tagged "manual" but we want some CI # coverage of it to make sure it doesn't break. - "//docs" + test_flags: + - "--test_tag_filters=-fix-bazelci-ubuntu" test_targets: - "//..." macos: diff --git a/.circleci/config.yml b/.circleci/config.yml index b1eec1db8c..db154c6c8f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -20,6 +20,13 @@ var_4: &init_environment # Setup circleci environment ./.circleci/env.sh + # Install GTK+ graphical user interface (libgtk-3-0), advanced linux sound architecture (libasound2) + # and network security service libraries (libnss3) & X11 Screen Saver extension library (libssx1) + # which are dependendies of chrome & needed for karma & protractor headless chrome tests. + # This is a very small install with the whole init_environment step taking less than 8 seconds. + sudo apt-get update + sudo apt-get -y install libgtk-3-0 libasound2 libnss3 libxss1 + # Overwrite the yarn installed in the docker container with our own version. pathToYarn=$(realpath ./third_party/github.com/yarnpkg/yarn/releases/download/v1.13.0/bin/yarn.js) sudo chmod a+x $pathToYarn @@ -203,6 +210,7 @@ jobs: - ./rules_nodejs/dist/npm_bazel_labs - ./rules_nodejs/dist/npm_bazel_hide-bazel-files - ./rules_nodejs/dist/npm_bazel_create + - ./rules_nodejs/dist/npm_bazel_protractor # This job cannot run on BuildKite (BazelCI) because it requires changing # directories to test inside nested workspaces. diff --git a/WORKSPACE b/WORKSPACE index abf05a9ed3..fec6a59cd5 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -62,6 +62,11 @@ local_repository( path = "packages/labs/src", ) +local_repository( + name = "npm_bazel_protractor", + path = "packages/protractor/src", +) + local_repository( name = "npm_bazel_typescript", path = "packages/typescript/src", @@ -160,6 +165,17 @@ load("@npm_bazel_karma//:package.bzl", "rules_karma_dependencies") rules_karma_dependencies() +# Setup the rules_webtesting toolchain +load("@io_bazel_rules_webtesting//web:repositories.bzl", "web_test_repositories") + +web_test_repositories() + +# Temporary work-around for https://github.com/angular/angular/issues/28681 +# TODO(gregmagolan): go back to @io_bazel_rules_webtesting browser_repositories +load("@npm_bazel_karma//:browser_repositories.bzl", "browser_repositories") + +browser_repositories() + # # Dependencies to run skydoc & generating documentation # diff --git a/commitlint.config.js b/commitlint.config.js index 6dc7290d87..6d642cf6cd 100644 --- a/commitlint.config.js +++ b/commitlint.config.js @@ -14,6 +14,7 @@ module.exports = { 'jasmine', 'karma', 'labs', + 'protractor', 'rollup', 'typescript', ] diff --git a/examples/app/BUILD.bazel b/examples/app/BUILD.bazel index 95501893d0..7c62a5b282 100644 --- a/examples/app/BUILD.bazel +++ b/examples/app/BUILD.bazel @@ -1,7 +1,10 @@ load("@build_bazel_rules_nodejs//:defs.bzl", "http_server", "rollup_bundle") load("@build_bazel_rules_nodejs//internal/web_package:web_package.bzl", "web_package") +load("@npm_bazel_protractor//:index.bzl", "protractor_web_test_suite") load("@npm_bazel_typescript//:index.bzl", "ts_config", "ts_devserver", "ts_library") +package(default_visibility = ["//visibility:public"]) + ts_library( name = "app", srcs = ["app.ts"], @@ -10,9 +13,6 @@ ts_library( ts_devserver( name = "devserver", index_html = "index.html", - port = 8080, - # Expose this to other examples, so we can test visibility of generated manifest file - visibility = ["//:__subpackages__"], # We'll collect all the devmode JS sources from these TypeScript libraries deps = [":app"], ) @@ -37,11 +37,7 @@ web_package( http_server( name = "prodserver", data = [":package"], - templated_args = [ - "package", - "-p", - "8080", - ], + templated_args = ["package"], ) ts_config( @@ -53,11 +49,25 @@ ts_config( ts_library( name = "e2e", testonly = 1, - srcs = ["app_e2e_test.ts"], + srcs = ["app.e2e-spec.ts"], tsconfig = ":tsconfig-test", deps = [ "@npm//@types/jasmine", - "@npm//@types/node", + "@npm//jasmine", "@npm//protractor", ], ) + +protractor_web_test_suite( + name = "prodserver_test", + on_prepare = ":protractor.on-prepare.js", + server = "//:prodserver", + deps = [":e2e"], +) + +protractor_web_test_suite( + name = "devserver_test", + on_prepare = ":protractor.on-prepare.js", + server = "//:devserver", + deps = [":e2e"], +) diff --git a/examples/app/WORKSPACE b/examples/app/WORKSPACE index 14674ff068..042f60d12f 100644 --- a/examples/app/WORKSPACE +++ b/examples/app/WORKSPACE @@ -44,3 +44,18 @@ install_bazel_dependencies() load("@npm_bazel_typescript//:index.bzl", "ts_setup_workspace") ts_setup_workspace() + +load("@npm_bazel_protractor//:package.bzl", "npm_bazel_protractor_dependencies") + +npm_bazel_protractor_dependencies() + +# Setup the rules_webtesting toolchain +load("@io_bazel_rules_webtesting//web:repositories.bzl", "web_test_repositories") + +web_test_repositories() + +# Temporary work-around for https://github.com/angular/angular/issues/28681 +# TODO(gregmagolan): go back to @io_bazel_rules_webtesting browser_repositories +load("@npm_bazel_protractor//:browser_repositories.bzl", "browser_repositories") + +browser_repositories() diff --git a/examples/app/app_e2e_test.ts b/examples/app/app.e2e-spec.ts similarity index 100% rename from examples/app/app_e2e_test.ts rename to examples/app/app.e2e-spec.ts diff --git a/examples/app/package.json b/examples/app/package.json index bdf2147d9d..654685b011 100644 --- a/examples/app/package.json +++ b/examples/app/package.json @@ -1,18 +1,12 @@ { "devDependencies": { "@bazel/hide-bazel-files": "file:../../dist/npm_bazel_hide-bazel-files", + "@bazel/protractor": "file:../../dist/npm_bazel_protractor", "@bazel/typescript": "file:../../dist/npm_bazel_typescript", - "@types/jasmine": "2.8.2", - "@types/node": "7.0.18", - "concurrently": "^3.5.1", - "jasmine": "2.8.0", - "protractor": "^5.4.2", + "@types/jasmine": "3.3.15", "typescript": "2.7.x" }, "scripts": { - "pretest": "bazel run @nodejs//:yarn && webdriver-manager update --standalone false --gecko false $CHROMEDRIVER_VERSION_ARG", - "e2e-devserver": "concurrently \"bazel run //:devserver\" \"while ! nc -z 127.0.0.1 8080; do sleep 1; done && protractor\" --kill-others --success first", - "e2e-prodserver": "concurrently \"bazel run //:prodserver\" \"while ! nc -z 127.0.0.1 8080; do sleep 1; done && protractor\" --kill-others --success first", - "test": "bazel build ... && yarn e2e-devserver && yarn e2e-prodserver" + "test": "bazel test ..." } } diff --git a/examples/app/protractor.conf.js b/examples/app/protractor.conf.js deleted file mode 100644 index a56d262bf0..0000000000 --- a/examples/app/protractor.conf.js +++ /dev/null @@ -1,7 +0,0 @@ -exports.config = { - specs: ['dist/bin/*_e2e_test.js'], - capabilities: {browserName: 'chrome', chromeOptions: {args: ['--no-sandbox']}}, - directConnect: true, - baseUrl: 'http://localhost:8080/', - framework: 'jasmine', -}; diff --git a/examples/app/protractor.on-prepare.js b/examples/app/protractor.on-prepare.js new file mode 100644 index 0000000000..7b5ea5d9f8 --- /dev/null +++ b/examples/app/protractor.on-prepare.js @@ -0,0 +1,23 @@ +// The function exported from this file is used by the protractor_web_test_suite. +// It is passed to the `onPrepare` configuration setting in protractor and executed +// before running tests. +// +// If the function returns a promise, as it does here, protractor will wait +// for the promise to resolve before running tests. + +const protractorUtils = require('@bazel/protractor/protractor-utils'); +const protractor = require('protractor'); + +module.exports = function(config) { + // In this example, `@bazel/protractor/protractor-utils` is used to run + // the server. protractorUtils.runServer() runs the server on a randomly + // selected port (given a port flag to pass to the server as an argument). + // The port used is returned in serverSpec and the protractor serverUrl + // is the configured. + const isProdserver = config.server.endsWith('prodserver'); + return protractorUtils + .runServer(config.workspace, config.server, isProdserver ? '-p' : '-port', []) + .then(serverSpec => { + protractor.browser.baseUrl = `http://localhost:${serverSpec.port}`; + }); +}; diff --git a/examples/app/yarn.lock b/examples/app/yarn.lock index b1a37c98b0..d6dd76fe5b 100644 --- a/examples/app/yarn.lock +++ b/examples/app/yarn.lock @@ -5,6 +5,11 @@ "@bazel/hide-bazel-files@file:../../dist/npm_bazel_hide-bazel-files": version "1.2.3" +"@bazel/protractor@file:../../dist/npm_bazel_protractor": + version "1.2.3" + dependencies: + protractor "^5.4.2" + "@bazel/typescript@file:../../dist/npm_bazel_typescript": version "1.2.3" dependencies: @@ -66,21 +71,16 @@ resolved "https://registry.yarnpkg.com/@protobufjs/utf8/-/utf8-1.1.0.tgz#a777360b5b39a1a2e5106f8e858f2fd2d060c570" integrity sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA= -"@types/jasmine@2.8.2": - version "2.8.2" - resolved "https://registry.yarnpkg.com/@types/jasmine/-/jasmine-2.8.2.tgz#6ae4d8740c0da5d5a627df725b4eed71b8e36668" - integrity sha512-RabEJPjYMpjWqW1qYj4k0rlgP5uzyguoc0yxedJdq7t5h19MYvqhjCR1evM3raZ/peHRxp1Qfl24iawvkibSug== +"@types/jasmine@3.3.15": + version "3.3.15" + resolved "https://registry.yarnpkg.com/@types/jasmine/-/jasmine-3.3.15.tgz#545be0670e828ac570566c45be570bbffcbc66d8" + integrity sha512-MljubxUVLT9wh/0NiyRWlcxSu/0axK+UYheZ04N5yaQclQkE8JuFYMsmwltPap2LEsJrvSf5p49/1514IY+d1Q== "@types/long@^4.0.0": version "4.0.0" resolved "https://registry.yarnpkg.com/@types/long/-/long-4.0.0.tgz#719551d2352d301ac8b81db732acb6bdc28dbdef" integrity sha512-1w52Nyx4Gq47uuu0EVcsHBxZFJgurQ+rTKS3qMHxR1GY2T8c2AJYd6vZoZ9q1rupaDjU0yT+Jc2XTyXkjeMA+Q== -"@types/node@7.0.18": - version "7.0.18" - resolved "https://registry.yarnpkg.com/@types/node/-/node-7.0.18.tgz#cd67f27d3dc0cfb746f0bdd5e086c4c5d55be173" - integrity sha1-zWfyfT3Az7dG8L3V4IbExdVb4XM= - "@types/node@^10.1.0": version "10.14.9" resolved "https://registry.yarnpkg.com/@types/node/-/node-10.14.9.tgz#2e8d678039d27943ce53a1913386133227fd9066" @@ -128,13 +128,6 @@ ansi-styles@^2.2.1: resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" integrity sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4= -ansi-styles@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" - integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== - dependencies: - color-convert "^1.9.0" - array-union@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" @@ -234,27 +227,6 @@ chalk@^1.1.1, chalk@^1.1.3: strip-ansi "^3.0.0" supports-color "^2.0.0" -chalk@^2.4.1: - version "2.4.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" - integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" - -color-convert@^1.9.0: - version "1.9.3" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" - integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== - dependencies: - color-name "1.1.3" - -color-name@1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" - integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= - combined-stream@^1.0.6, combined-stream@~1.0.6: version "1.0.8" resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" @@ -262,31 +234,11 @@ combined-stream@^1.0.6, combined-stream@~1.0.6: dependencies: delayed-stream "~1.0.0" -commander@2.6.0: - version "2.6.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.6.0.tgz#9df7e52fb2a0cb0fb89058ee80c3104225f37e1d" - integrity sha1-nfflL7Kgyw+4kFjugMMQQiXzfh0= - concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= -concurrently@^3.5.1: - version "3.6.1" - resolved "https://registry.yarnpkg.com/concurrently/-/concurrently-3.6.1.tgz#2f95baec5c4051294dfbb55b57a3b98a3e2b45ec" - integrity sha512-/+ugz+gwFSEfTGUxn0KHkY+19XPRTXR8+7oUK/HxgiN1n7FjeJmkrbSiXAJfyQ0zORgJYPaenmymwon51YXH9Q== - dependencies: - chalk "^2.4.1" - commander "2.6.0" - date-fns "^1.23.0" - lodash "^4.5.1" - read-pkg "^3.0.0" - rx "2.3.24" - spawn-command "^0.0.2-1" - supports-color "^3.2.3" - tree-kill "^1.1.0" - core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" @@ -299,11 +251,6 @@ dashdash@^1.12.0: dependencies: assert-plus "^1.0.0" -date-fns@^1.23.0: - version "1.30.1" - resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-1.30.1.tgz#2e71bf0b119153dbb4cc4e88d9ea5acfb50dc05c" - integrity sha512-hBSVCvSmWC+QypYObzwGOd9wqdDpOt+0wl0KbU+R+uuZBS1jN8VsD1ss3irQDknRj5NvxiTF6oj/nDRnN/UQNw== - debug@^3.1.0: version "3.2.6" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" @@ -337,13 +284,6 @@ ecc-jsbn@~0.1.1: jsbn "~0.1.0" safer-buffer "^2.1.0" -error-ex@^1.3.1: - version "1.3.2" - resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" - integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== - dependencies: - is-arrayish "^0.2.1" - es6-promise@^4.0.3: version "4.2.8" resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.8.tgz#4eb21594c972bc40553d276e510539143db53e0a" @@ -356,7 +296,7 @@ es6-promisify@^5.0.0: dependencies: es6-promise "^4.0.3" -escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: +escape-string-regexp@^1.0.2: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= @@ -441,11 +381,6 @@ globby@^5.0.0: pify "^2.0.0" pinkie-promise "^2.0.0" -graceful-fs@^4.1.2: - version "4.1.15" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.15.tgz#ffb703e1066e8a0eeaa4c8b80ba9253eeefbfb00" - integrity sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA== - har-schema@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" @@ -466,21 +401,6 @@ has-ansi@^2.0.0: dependencies: ansi-regex "^2.0.0" -has-flag@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" - integrity sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo= - -has-flag@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" - integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= - -hosted-git-info@^2.1.4: - version "2.7.1" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.7.1.tgz#97f236977bd6e125408930ff6de3eec6281ec047" - integrity sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w== - http-signature@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" @@ -521,11 +441,6 @@ ini@^1.3.4: resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== -is-arrayish@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" - integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= - is-path-cwd@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d" @@ -584,11 +499,6 @@ jsbn@~0.1.0: resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= -json-parse-better-errors@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" - integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== - json-schema-traverse@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" @@ -631,21 +541,6 @@ lie@~3.3.0: dependencies: immediate "~3.0.5" -load-json-file@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-4.0.0.tgz#2f5f45ab91e33216234fd53adab668eb4ec0993b" - integrity sha1-L19Fq5HjMhYjT9U62rZo607AmTs= - dependencies: - graceful-fs "^4.1.2" - parse-json "^4.0.0" - pify "^3.0.0" - strip-bom "^3.0.0" - -lodash@^4.5.1: - version "4.17.11" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d" - integrity sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg== - long@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/long/-/long-4.0.0.tgz#9a7b71cfb7d361a194ea555241c92f7468d5bf28" @@ -685,16 +580,6 @@ ms@^2.1.1: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== -normalize-package-data@^2.3.2: - version "2.5.0" - resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" - integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== - dependencies: - hosted-git-info "^2.1.4" - resolve "^1.10.0" - semver "2 || 3 || 4 || 5" - validate-npm-package-license "^3.0.1" - oauth-sign@~0.9.0: version "0.9.0" resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" @@ -730,14 +615,6 @@ pako@~1.0.2: resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.10.tgz#4328badb5086a426aa90f541977d4955da5c9732" integrity sha512-0DTvPVU3ed8+HNXOu5Bs+o//Mbdj9VNQMUOe9oKCwh8l0GNwpTDMKCWbRjgtD291AWnkAgkqA/LOnQS8AmS1tw== -parse-json@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0" - integrity sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA= - dependencies: - error-ex "^1.3.1" - json-parse-better-errors "^1.0.1" - path-is-absolute@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" @@ -748,18 +625,6 @@ path-is-inside@^1.0.1: resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" integrity sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM= -path-parse@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" - integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== - -path-type@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f" - integrity sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg== - dependencies: - pify "^3.0.0" - performance-now@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" @@ -770,11 +635,6 @@ pify@^2.0.0: resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw= -pify@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" - integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY= - pinkie-promise@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" @@ -862,15 +722,6 @@ qs@~6.5.2: resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== -read-pkg@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-3.0.0.tgz#9cbc686978fee65d16c00e2b19c237fcf6e38389" - integrity sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k= - dependencies: - load-json-file "^4.0.0" - normalize-package-data "^2.3.2" - path-type "^3.0.0" - readable-stream@~2.3.6: version "2.3.6" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf" @@ -910,13 +761,6 @@ request@^2.87.0: tunnel-agent "^0.6.0" uuid "^3.3.2" -resolve@^1.10.0: - version "1.11.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.11.0.tgz#4014870ba296176b86343d50b60f3b50609ce232" - integrity sha512-WL2pBDjqT6pGUNSUzMw00o4T7If+z4H2x3Gz893WoUQ5KW8Vr9txp00ykiP16VBaZF5+j/OcXJHZ9+PCvdiDKw== - dependencies: - path-parse "^1.0.6" - rimraf@^2.2.8, rimraf@^2.5.2, rimraf@^2.5.4: version "2.6.3" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" @@ -924,11 +768,6 @@ rimraf@^2.2.8, rimraf@^2.5.2, rimraf@^2.5.4: dependencies: glob "^7.1.3" -rx@2.3.24: - version "2.3.24" - resolved "https://registry.yarnpkg.com/rx/-/rx-2.3.24.tgz#14f950a4217d7e35daa71bbcbe58eff68ea4b2b7" - integrity sha1-FPlQpCF9fjXapxu8vljv9o6ksrc= - safe-buffer@^5.0.1, safe-buffer@^5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.2" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" @@ -961,16 +800,16 @@ selenium-webdriver@3.6.0, selenium-webdriver@^3.0.1: tmp "0.0.30" xml2js "^0.4.17" -"semver@2 || 3 || 4 || 5", semver@^5.3.0: - version "5.7.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.0.tgz#790a7cf6fea5459bac96110b29b60412dc8ff96b" - integrity sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA== - semver@5.6.0: version "5.6.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004" integrity sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg== +semver@^5.3.0: + version "5.7.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.0.tgz#790a7cf6fea5459bac96110b29b60412dc8ff96b" + integrity sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA== + set-immediate-shim@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61" @@ -1001,37 +840,6 @@ source-map@^0.6.0: resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== -spawn-command@^0.0.2-1: - version "0.0.2-1" - resolved "https://registry.yarnpkg.com/spawn-command/-/spawn-command-0.0.2-1.tgz#62f5e9466981c1b796dc5929937e11c9c6921bd0" - integrity sha1-YvXpRmmBwbeW3Fkpk34RycaSG9A= - -spdx-correct@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.0.tgz#fb83e504445268f154b074e218c87c003cd31df4" - integrity sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q== - dependencies: - spdx-expression-parse "^3.0.0" - spdx-license-ids "^3.0.0" - -spdx-exceptions@^2.1.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz#2ea450aee74f2a89bfb94519c07fcd6f41322977" - integrity sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA== - -spdx-expression-parse@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz#99e119b7a5da00e05491c9fa338b7904823b41d0" - integrity sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg== - dependencies: - spdx-exceptions "^2.1.0" - spdx-license-ids "^3.0.0" - -spdx-license-ids@^3.0.0: - version "3.0.4" - resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.4.tgz#75ecd1a88de8c184ef015eafb51b5b48bfd11bb1" - integrity sha512-7j8LYJLeY/Yb6ACbQ7F76qy5jHkp0U6jgBfJsk97bwWlVUnUWsAgpyaCvo17h0/RQGnQ036tVDomiwoI4pDkQA== - sshpk@^1.7.0: version "1.16.1" resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.16.1.tgz#fb661c0bef29b39db40769ee39fa70093d6f6877" @@ -1061,30 +869,11 @@ strip-ansi@^3.0.0: dependencies: ansi-regex "^2.0.0" -strip-bom@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" - integrity sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM= - supports-color@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" integrity sha1-U10EXOa2Nj+kARcIRimZXp3zJMc= -supports-color@^3.2.3: - version "3.2.3" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" - integrity sha1-ZawFBLOVQXHYpklGsq48u4pfVPY= - dependencies: - has-flag "^1.0.0" - -supports-color@^5.3.0: - version "5.5.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" - integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== - dependencies: - has-flag "^3.0.0" - tmp@0.0.30: version "0.0.30" resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.30.tgz#72419d4a8be7d6ce75148fd8b324e593a711c2ed" @@ -1100,11 +889,6 @@ tough-cookie@~2.4.3: psl "^1.1.24" punycode "^1.4.1" -tree-kill@^1.1.0: - version "1.2.1" - resolved "https://registry.yarnpkg.com/tree-kill/-/tree-kill-1.2.1.tgz#5398f374e2f292b9dcc7b2e71e30a5c3bb6c743a" - integrity sha512-4hjqbObwlh2dLyW4tcz0Ymw0ggoaVDMveUB9w8kFSQScdRLo0gxO9J7WFcUBo+W3C1TLdFIEwNOWebgZZ0RH9Q== - tslib@^1.8.1: version "1.10.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a" @@ -1151,14 +935,6 @@ uuid@^3.3.2: resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131" integrity sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA== -validate-npm-package-license@^3.0.1: - version "3.0.4" - resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" - integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== - dependencies: - spdx-correct "^3.0.0" - spdx-expression-parse "^3.0.0" - verror@1.10.0: version "1.10.0" resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" diff --git a/package.json b/package.json index 164599d4a2..e9590e56e1 100644 --- a/package.json +++ b/package.json @@ -38,6 +38,7 @@ "node_resolve_main_2": "file:./tools/npm_packages/node_resolve_main_2", "node_resolve_nested_main": "file:./tools/npm_packages/node_resolve_nested_main", "protobufjs": "6.8.8", + "protractor": "^5.4.2", "rollup": "1.0.0", "rollup-plugin-amd": "^3.0.0", "rollup-plugin-commonjs": "^9.2.1", diff --git a/packages/protractor/BUILD.bazel b/packages/protractor/BUILD.bazel new file mode 100644 index 0000000000..2e8231462e --- /dev/null +++ b/packages/protractor/BUILD.bazel @@ -0,0 +1,51 @@ +# Copyright 2017 The Bazel Authors. All rights reserved. +# +# Licensed 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. + +load("@build_bazel_rules_nodejs//:defs.bzl", "npm_package") + +# Copy the license from our parent folder +genrule( + name = "copy_LICENSE", + srcs = ["@build_bazel_rules_nodejs//:LICENSE"], + outs = ["LICENSE"], + cmd = "cp $< $@", +) + +# Ugly genrule depending on local linux environment to build the README out of skylark doc generation. +# Only referenced when we do a release. +# TODO: This ought to be possible with stardoc alone. Need to coordinate with Chris Parsons. +genrule( + name = "generate_README", + srcs = [ + "//packages/protractor/docs:index.md", + "//packages/protractor/docs:install.md", + ], + outs = ["README.md"], + cmd = """cat $(location //packages/protractor/docs:install.md) $(location //packages/protractor/docs:index.md) | sed 's/^##/\\\n##/' > $@""", +) + +npm_package( + name = "npm_package", + srcs = [ + "@npm_bazel_protractor//:package_contents", + ], + vendor_external = [ + "npm_bazel_protractor", + ], + deps = [ + ":copy_LICENSE", + ":generate_README", + "@npm_bazel_protractor//:utils_lib", + ], +) diff --git a/packages/protractor/docs/BUILD.bazel b/packages/protractor/docs/BUILD.bazel new file mode 100644 index 0000000000..1fdac1b428 --- /dev/null +++ b/packages/protractor/docs/BUILD.bazel @@ -0,0 +1,50 @@ +# Copyright 2019 The Bazel Authors. All rights reserved. +# +# Licensed 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. + +load("@build_bazel_rules_nodejs//:defs.bzl", "nodejs_test") +load("@io_bazel_skydoc//stardoc:stardoc.bzl", "stardoc") + +package(default_visibility = ["//visibility:public"]) + +exports_files(["install.md"]) + +stardoc( + name = "docs", + testonly = True, + out = "index.md", + input = "@npm_bazel_protractor//:index.bzl", + deps = [ + "@npm_bazel_protractor//:bzl", + # We need to restate local workspace dependencies here in `//foo:bzl` + # format to work-around a bug in stardoc where .bzl files from + # `@build_bazel_rules_nodejs//foo:bzl` style deps are not found + # by the doc generator: + # ``` + # ``` + "//:bzl", + "//internal/common:bzl", + ], +) + +nodejs_test( + name = "test", + data = [ + "docs_test.js", + ":index.md", + ], + entry_point = ":docs_test.js", + tags = [ + "fix-windows", + ], +) diff --git a/packages/protractor/docs/docs_test.js b/packages/protractor/docs/docs_test.js new file mode 100644 index 0000000000..7743f9a37f --- /dev/null +++ b/packages/protractor/docs/docs_test.js @@ -0,0 +1,6 @@ +const actual = require('fs').readFileSync( + process.env['TEST_SRCDIR'] + '/build_bazel_rules_nodejs/packages/protractor/docs/index.md', + {encoding: 'utf-8'}); +if (actual.indexOf('') >= 0) { + throw new Error('Found in index.md'); +} diff --git a/packages/protractor/docs/install.md b/packages/protractor/docs/install.md new file mode 100644 index 0000000000..f551a726ad --- /dev/null +++ b/packages/protractor/docs/install.md @@ -0,0 +1,16 @@ +# Protractor rules for Bazel + +**WARNING: this is beta-quality software. Breaking changes are likely. Not recommended for production use without expert support.** + +The Protractor rules run tests under the Protractor framework with Bazel. + +## Installation + +Add the `@bazel/protractor` npm package to your `devDependencies` in `package.json`. + +Your `WORKSPACE` should declare a `yarn_install` or `npm_install` rule named `npm`. +It should then install the rules found in the npm packages using the `install_bazel_dependencies' function. +See https://github.com/bazelbuild/rules_nodejs/#quickstart + +This causes the `@bazel/protractor` package to be installed as a Bazel workspace named `npm_bazel_protractor`. + diff --git a/packages/protractor/src/BUILD.bazel b/packages/protractor/src/BUILD.bazel new file mode 100644 index 0000000000..8fc7cb6af7 --- /dev/null +++ b/packages/protractor/src/BUILD.bazel @@ -0,0 +1,59 @@ +# Copyright 2018 The Bazel Authors. All rights reserved. +# +# Licensed 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. + +# BEGIN-INTERNAL +# Parts of this BUILD file only necessary when building from source. +# The generated `@bazel/protractor` npm package contains a trimmed BUILD file using INTERNAL fences. +load("@bazel_skylib//:bzl_library.bzl", "bzl_library") +load("@npm_bazel_typescript//:defaults.bzl", "ts_library") + +package(default_visibility = ["//visibility:public"]) + +bzl_library( + name = "bzl", + testonly = True, + srcs = glob(["*.bzl"]), + deps = [ + "@build_bazel_rules_nodejs//:bzl", + "@build_bazel_rules_nodejs//internal/common:bzl", + "@io_bazel_rules_webtesting//web", + ], +) + +filegroup( + name = "package_contents", + srcs = [ + "BUILD.bazel", + "browser_repositories.bzl", + "index.bzl", + "package.bzl", + "package.json", + "protractor.conf.js", + "protractor.js", + "protractor_web_test.bzl", + ], +) + +ts_library( + name = "utils_lib", + srcs = ["protractor-utils.ts"], + module_name = "@bazel/protractor/protractor-utils", + module_root = "protractor-utils", + deps = ["@npm//@types/node"], +) + +# END-INTERNAL +exports_files([ + "protractor.conf.js", +]) diff --git a/packages/protractor/src/WORKSPACE b/packages/protractor/src/WORKSPACE new file mode 100644 index 0000000000..471997a0a9 --- /dev/null +++ b/packages/protractor/src/WORKSPACE @@ -0,0 +1,15 @@ +# Copyright 2019 The Bazel Authors. All rights reserved. +# +# Licensed 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. + +workspace(name = "npm_bazel_protractor") diff --git a/packages/protractor/src/browser_repositories.bzl b/packages/protractor/src/browser_repositories.bzl new file mode 100644 index 0000000000..53d11713a8 --- /dev/null +++ b/packages/protractor/src/browser_repositories.bzl @@ -0,0 +1,114 @@ +# Copyright 2018 The Bazel Authors. All rights reserved. +# +# Licensed 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. + +"""Pinned browser versions tested against in https://github.com/bazelbuild/rules_nodejs CI. +""" + +load("@io_bazel_rules_webtesting//web/internal:platform_http_file.bzl", "platform_http_file") + +def browser_repositories(): + """Load pinned rules_webtesting browser versions.""" + + platform_http_file( + name = "org_chromium_chromium", + amd64_sha256 = + "eb6754c7918da5eab42a42bbda7efdf7f1661eaa3802b8940841f0c2c312299f", + amd64_urls = [ + # Chromium 74.0.3729.0 (2019-03-08 snaphot 638880) + # https://commondatastorage.googleapis.com/chromium-browser-snapshots/index.html?prefix=Linux_x64/638880/ + # Current linux stable as of 2019-05-15 + # https://www.chromium.org/developers/calendar + "https://commondatastorage.googleapis.com/chromium-browser-snapshots/Linux_x64/638880/chrome-linux.zip", + ], + licenses = ["notice"], # BSD 3-clause (maybe more?) + macos_sha256 = + "c48bdffac6a91c85c17a848012b1a45fbf36e3a2d4aaac5b6ded8ac65b1d96e3", + macos_urls = [ + # Chromium 74.0.3729.0 (2019-03-08 snaphot 638880) + # https://commondatastorage.googleapis.com/chromium-browser-snapshots/index.html?prefix=Mac/638880/ + # Current mac stable as of 2019-05-15 + # https://www.chromium.org/developers/calendar + "https://commondatastorage.googleapis.com/chromium-browser-snapshots/Mac/638880/chrome-mac.zip", + ], + windows_sha256 = + "d1bb728118c12ea436d8ea07dba980789e7d860aa664dd1fad78bc20e8d9391c", + windows_urls = [ + # Chromium 66.0.3359.0 (2018-03-01 snaphot 540270) + # https://commondatastorage.googleapis.com/chromium-browser-snapshots/index.html?prefix=Win_x64/612439/ + # NOTE: There is an issue with chromium 68-71 with Windows: https://bugs.chromium.org/p/chromium/issues/detail?id=540270 + # and pinning to 72 is not possible as the archive name has changed to chrome-win.zip which breaks + # as the executable path the hard-coded in rules_webtesting and includes the archive name. + "https://commondatastorage.googleapis.com/chromium-browser-snapshots/Win_x64/540270/chrome-win32.zip", + ], + ) + + platform_http_file( + name = "org_chromium_chromedriver", + amd64_sha256 = + "ec9dbe021338f0befaecca702abc576cb7cc31a2f5a852c2c41e94721af5d3ad", + amd64_urls = [ + # ChromeDriver 74.0.3729.6 supports Chrome 74 + # http://chromedriver.chromium.org/downloads + "https://chromedriver.storage.googleapis.com/74.0.3729.6/chromedriver_linux64.zip", + ], + licenses = ["reciprocal"], # BSD 3-clause, ICU, MPL 1.1, libpng (BSD/MIT-like), Academic Free License v. 2.0, BSD 2-clause, MIT + macos_sha256 = + "b4b73681404d231d81a9b7ab9d4f0cb090f3e69240296eca2eb46e2629519152", + macos_urls = [ + # ChromeDriver 74.0.3729.6 supports Chrome 74 + # http://chromedriver.chromium.org/downloads + "https://chromedriver.storage.googleapis.com/74.0.3729.6/chromedriver_mac64.zip", + ], + windows_sha256 = + "a8fa028acebef7b931ef9cb093f02865f9f7495e49351f556e919f7be77f072e", + windows_urls = [ + # ChromeDriver 2.38 supports Chrome v65-67 + # http://chromedriver.chromium.org/downloads + "https://chromedriver.storage.googleapis.com/2.38/chromedriver_win32.zip", + ], + ) + + platform_http_file( + name = "org_mozilla_firefox", + amd64_sha256 = + "3a729ddcb1e0f5d63933177a35177ac6172f12edbf9fbbbf45305f49333608de", + amd64_urls = [ + "https://mirror.bazel.build/ftp.mozilla.org/pub/firefox/releases/61.0.2/linux-x86_64/en-US/firefox-61.0.2.tar.bz2", + "https://ftp.mozilla.org/pub/firefox/releases/61.0.2/linux-x86_64/en-US/firefox-61.0.2.tar.bz2", + ], + licenses = ["reciprocal"], # MPL 2.0 + macos_sha256 = + "bf23f659ae34832605dd0576affcca060d1077b7bf7395bc9874f62b84936dc5", + macos_urls = [ + "https://mirror.bazel.build/ftp.mozilla.org/pub/firefox/releases/61.0.2/mac/en-US/Firefox%2061.0.2.dmg", + "https://ftp.mozilla.org/pub/firefox/releases/61.0.2/mac/en-US/Firefox%2061.0.2.dmg", + ], + ) + + platform_http_file( + name = "org_mozilla_geckodriver", + amd64_sha256 = + "c9ae92348cf00aa719be6337a608fae8304691a95668e8e338d92623ba9e0ec6", + amd64_urls = [ + "https://mirror.bazel.build/github.com/mozilla/geckodriver/releases/download/v0.21.0/geckodriver-v0.21.0-linux64.tar.gz", + "https://github.com/mozilla/geckodriver/releases/download/v0.21.0/geckodriver-v0.21.0-linux64.tar.gz", + ], + licenses = ["reciprocal"], # MPL 2.0 + macos_sha256 = + "ce4a3e9d706db94e8760988de1ad562630412fa8cf898819572522be584f01ce", + macos_urls = [ + "https://mirror.bazel.build/github.com/mozilla/geckodriver/releases/download/v0.21.0/geckodriver-v0.21.0-macos.tar.gz", + "https://github.com/mozilla/geckodriver/releases/download/v0.21.0/geckodriver-v0.21.0-macos.tar.gz", + ], + ) diff --git a/packages/protractor/src/defaults.bzl b/packages/protractor/src/defaults.bzl new file mode 100644 index 0000000000..2cbdddd2a4 --- /dev/null +++ b/packages/protractor/src/defaults.bzl @@ -0,0 +1,47 @@ +# Copyright 2017 The Bazel Authors. All rights reserved. +# +# Licensed 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. + +""" Defaults for usage without @npm//@bazel/protractor +""" + +load( + "@npm_bazel_protractor//:index.bzl", + _protractor_web_test = "protractor_web_test", + _protractor_web_test_suite = "protractor_web_test_suite", +) + +INTERNAL_PROTRACTOR = "@npm//protractor" +INTERNAL_PROTRACTOR_ENTRY_POINT = "@npm_bazel_protractor//:protractor.js" + +def protractor_web_test(data = [], **kwargs): + _protractor_web_test( + # When there is no @npm//@bazel/protractor package we use @npm_bazel_protractor instead. + # @npm_bazel_protractor//:utils_lib dependency must also be added manually since without a dep on + # @npm//@bazel/protractor "@bazel/protractor/protractor-utils" will not resolve. + data = data + ["@npm_bazel_protractor//:utils_lib"], + protractor = INTERNAL_PROTRACTOR, + protractor_entry_point = INTERNAL_PROTRACTOR_ENTRY_POINT, + **kwargs + ) + +def protractor_web_test_suite(data = [], **kwargs): + _protractor_web_test_suite( + # When there is no @npm//@bazel/protractor package we use @npm_bazel_protractor instead. + # @npm_bazel_protractor//:utils_lib dependency must also be added manually since without a dep on + # @npm//@bazel/protractor "@bazel/protractor/protractor-utils" will not resolve. + data = data + ["@npm_bazel_protractor//:utils_lib"], + protractor = INTERNAL_PROTRACTOR, + protractor_entry_point = INTERNAL_PROTRACTOR_ENTRY_POINT, + **kwargs + ) diff --git a/packages/protractor/src/index.bzl b/packages/protractor/src/index.bzl new file mode 100644 index 0000000000..dbc6a95c38 --- /dev/null +++ b/packages/protractor/src/index.bzl @@ -0,0 +1,27 @@ +# Copyright 2019 The Bazel Authors. All rights reserved. +# +# Licensed 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. + +""" Public API surface is re-exported here. +""" + +load( + "//:protractor_web_test.bzl", + _protractor_web_test = "protractor_web_test", + _protractor_web_test_suite = "protractor_web_test_suite", +) + +protractor_web_test = _protractor_web_test +protractor_web_test_suite = _protractor_web_test_suite +# DO NOT ADD MORE rules here unless they appear in the generated docsite. +# Run yarn skydoc to re-generate the docsite. diff --git a/packages/protractor/src/package.bzl b/packages/protractor/src/package.bzl new file mode 100644 index 0000000000..aae39cc6d1 --- /dev/null +++ b/packages/protractor/src/package.bzl @@ -0,0 +1,38 @@ +# Copyright 2018 The Bazel Authors. All rights reserved. +# +# Licensed 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. + +"""Package file which defines npm_bazel_protractor dependencies +""" + +load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") + +def npm_bazel_protractor_dependencies(): + """ + Fetch our transitive dependencies. + + If the user wants to get a different version of these, they can just fetch it + from their WORKSPACE before calling this function, or not call this function at all. + """ + + # ts_web_test depends on the web testing rules to provision browsers. + _maybe( + http_archive, + name = "io_bazel_rules_webtesting", + urls = ["https://github.com/bazelbuild/rules_webtesting/releases/download/0.3.1/rules_webtesting.tar.gz"], + sha256 = "f89ca8e91ac53b3c61da356c685bf03e927f23b97b086cc593db8edc088c143f", + ) + +def _maybe(repo_rule, name, **kwargs): + if name not in native.existing_rules(): + repo_rule(name = name, **kwargs) diff --git a/packages/protractor/src/package.json b/packages/protractor/src/package.json new file mode 100644 index 0000000000..3b17f5d173 --- /dev/null +++ b/packages/protractor/src/package.json @@ -0,0 +1,27 @@ +{ + "name": "@bazel/protractor", + "description": "Run Protractor tests under Bazel", + "license": "Apache-2.0", + "version": "0.0.0-PLACEHOLDER", + "repository": { + "type" : "git", + "url" : "https://github.com/bazelbuild/rules_nodejs.git", + "directory": "packages/protractor" + }, + "bugs": { + "url": "https://github.com/bazelbuild/rules_nodejs/issues" + }, + "keywords": [ + "protractor", + "bazel" + ], + "main": "index.js", + "dependencies": { + "protractor": "^5.4.2" + }, + "bazelWorkspaces": { + "npm_bazel_protractor": { + "rootPath": "." + } + } +} \ No newline at end of file diff --git a/packages/protractor/src/protractor-utils.ts b/packages/protractor/src/protractor-utils.ts new file mode 100644 index 0000000000..427197851b --- /dev/null +++ b/packages/protractor/src/protractor-utils.ts @@ -0,0 +1,119 @@ +/** + * @license + * Copyright 2017 The Bazel Authors. All rights reserved. + * + * Licensed 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 * as child_process from 'child_process'; +import * as net from 'net'; + +export function isTcpPortFree(port: number): Promise { + return new Promise((resolve, reject) => { + const server = net.createServer(); + server.on('error', (e) => { + resolve(false); + }); + server.on('close', () => { + resolve(true); + }); + server.listen(port, () => { + server.close(); + }); + }); +} + +export function isTcpPortBound(port: number): Promise { + return new Promise((resolve, reject) => { + const client = new net.Socket(); + client.once('connect', () => { + resolve(true); + }); + client.once('error', (e) => { + resolve(false); + }); + client.connect(port); + }); +} + +export async function findFreeTcpPort(): Promise { + const range = { + min: 32768, + max: 60000, + }; + for (let i = 0; i < 100; i++) { + let port = Math.floor(Math.random() * (range.max - range.min) + range.min); + if (await isTcpPortFree(port)) { + return port; + } + } + throw new Error('Unable to find a free port'); +} + +// Interface for config parameter of the protractor_web_test_suite onPrepare function +export interface OnPrepareConfig { + // The workspace name + workspace: string; + + // The server binary to run + server: string; +} + +export function waitForServer(port: number, timeout: number): Promise { + return isTcpPortBound(port).then(isBound => { + if (!isBound) { + if (timeout <= 0) { + throw new Error('Timeout waiting for server to start'); + } + const wait = Math.min(timeout, 500); + return new Promise((res, rej) => setTimeout(res, wait)) + .then(() => waitForServer(port, timeout - wait)); + } + return true; + }); +} + +// Return type from runServer function +export interface ServerSpec { + // Port number that the server is running on + port: number; +} + +/** + * Runs the specified server binary from a given workspace and waits for the server + * being ready. The server binary will be resolved from the Bazel runfiles. Note that + * the server will be launched with a random free port in order to support test concurrency + * with Bazel. + */ +export async function runServer( + workspace: string, serverTarget: string, portFlag: string, serverArgs: string[], + timeout = 5000): Promise { + const serverPath = require.resolve(`${workspace}/${serverTarget}`); + const port = await findFreeTcpPort(); + + // Start the Bazel server binary with a random free TCP port. + const serverProcess = child_process.spawn( + serverPath, serverArgs.concat([portFlag, port.toString()]), {stdio: 'inherit'}); + + // In case the process exited with an error, we want to propagate the error. + serverProcess.on('exit', exitCode => { + if (exitCode !== 0) { + throw new Error(`Server exited with error code: ${exitCode}`); + } + }); + + // Wait for the server to be bound to the given port. + await waitForServer(port, timeout); + + return {port}; +} diff --git a/packages/protractor/src/protractor.conf.js b/packages/protractor/src/protractor.conf.js new file mode 100644 index 0000000000..6769c472d2 --- /dev/null +++ b/packages/protractor/src/protractor.conf.js @@ -0,0 +1,188 @@ +/** + * @license + * Copyright 2017 The Bazel Authors. All rights reserved. + * + * Licensed 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. + */ +const DEBUG = false; + +const configPath = 'TMPL_config'; +const onPreparePath = 'TMPL_on_prepare'; +const workspace = 'TMPL_workspace'; +const server = 'TMPL_server'; + +if (DEBUG) + console.info(`Protractor test starting with: + cwd: ${process.cwd()} + configPath: ${configPath} + onPreparePath: ${onPreparePath} + workspace: ${workspace} + server: ${server}`); + +// Helper function to warn when a user specified value is being overwritten +function setConf(conf, name, value, msg) { + if (conf[name] && conf[name] !== value) { + console.warn( + `Your protractor configuration specifies an option which is overwritten by Bazel: '${ + name}' ${msg}`); + } + conf[name] = value; +} + +function mergeCapabilities(conf, capabilities) { + if (conf.capabilities) { + if (conf.capabilities.browserName === capabilities.browserName) { + // there are capabilities to merge + if (capabilities.browserName === 'chrome') { + conf.capabilities.chromeOptions = conf.capabilities.chromeOptions || {}; + conf.capabilities.chromeOptions.binary = capabilities.chromeOptions.binary; + conf.capabilities.chromeOptions.args = conf.capabilities.chromeOptions.args || []; + conf.capabilities.chromeOptions.args.push(...capabilities.chromeOptions.args); + console.warn( + `Your protractor configuration specifies capabilities for browser '${ + conf.capabilities.browserName}' +which will be merged with capabilities provided by Bazel resulting in:`, + JSON.stringify(conf.capabilities, null, 2)); + } else { + // TODO(gmagolan): implement firefox support for protractor + throw new Error( + `Unexpected browserName ${capabilities.browserName} for capabilities merging`); + } + } else { + console.warn(`Your protractor configuration specifies capabilities for browser '${ + conf.capabilities.browserName}' which will be overwritten by Bazel`); + conf.capabilities = capabilities; + } + } else { + conf.capabilities = capabilities; + } +} + +let conf = {}; + +// Import the user's base protractor configuration if specified +if (configPath) { + const baseConf = require(configPath); + if (!baseConf.config) { + throw new Error('Invalid base protractor configuration. Expected config to be exported.'); + } + conf = baseConf.config; + if (DEBUG) console.info(`Base protractor configuration: ${JSON.stringify(conf, null, 2)}`); +} + +// Import the user's on prepare function if specified +if (onPreparePath) { + const onPrepare = require(onPreparePath); + if (typeof onPrepare === 'function') { + const original = conf.onPrepare; + conf.onPrepare = function() { + return Promise.resolve(original ? original() : null) + .then(() => Promise.resolve(onPrepare({workspace, server}))); + }; + } else { + throw new Error( + 'Invalid protractor on_prepare script. Expected a function as the default export.'); + } +} + +// Override the user's base protractor configuration as appropriate based on the +// ts_web_test_suite & rules_webtesting WEB_TEST_METADATA attributes +setConf(conf, 'framework', 'jasmine2', 'is set to jasmine2'); + +const specs = + [TMPL_specs].map(s => require.resolve(s)).filter(s => /(\b|_)(spec|test)\.js$/.test(s)); + +setConf(conf, 'specs', specs, 'are determined by the srcs and deps attribute'); + +// WEB_TEST_METADATA is configured in rules_webtesting based on value +// of the browsers attribute passed to ts_web_test_suite +// We setup the protractor configuration based on the values in this object +if (process.env['WEB_TEST_METADATA']) { + const webTestMetadata = require(process.env['WEB_TEST_METADATA']); + if (DEBUG) console.info(`WEB_TEST_METADATA: ${JSON.stringify(webTestMetadata, null, 2)}`); + if (webTestMetadata['environment'] === 'sauce') { + // If a sauce labs browser is chosen for the test such as + // "@io_bazel_rules_webtesting//browsers/sauce:chrome-win10" + // than the 'environment' will equal 'sauce'. + // We expect that a SAUCE_USERNAME and SAUCE_ACCESS_KEY is available + // from the environment for this test to run + + // TODO(gmagolan): implement sauce labs support for protractor + throw new Error('Saucelabs not yet support by protractor_web_test_suite.'); + + // if (!process.env.SAUCE_USERNAME || !process.env.SAUCE_ACCESS_KEY) { + // console.error('Make sure the SAUCE_USERNAME and SAUCE_ACCESS_KEY environment variables are + // set.'); + // process.exit(1); + // } + // setConf(conf, 'sauceUser', process.env.SAUCE_USERNAME, 'is determined by the SAUCE_USERNAME + // environment variable'); + // setConf(conf, 'sauceKey', process.env.SAUCE_ACCESS_KEY, 'is determined by the + // SAUCE_ACCESS_KEY environment variable'); + } else if (webTestMetadata['environment'] === 'local') { + // When a local chrome or firefox browser is chosen such as + // "@io_bazel_rules_webtesting//browsers:chromium-local" or + // "@io_bazel_rules_webtesting//browsers:firefox-local" + // then the 'environment' will equal 'local' and + // 'webTestFiles' will contain the path to the binary to use + const webTestNamedFiles = webTestMetadata['webTestFiles'][0]['namedFiles']; + const headless = !process.env['DISPLAY']; + if (webTestNamedFiles['CHROMIUM']) { + const chromeBin = require.resolve(webTestNamedFiles['CHROMIUM']); + const chromeDriver = require.resolve(webTestNamedFiles['CHROMEDRIVER']); + + // The sandbox needs to be disabled, because it causes Chrome to crash on some environments. + // See: http://chromedriver.chromium.org/help/chrome-doesn-t-start + const args = ['--no-sandbox']; + if (headless) { + args.push('--headless', '--disable-gpu', '--disable-dev-shm-usage'); + } + setConf(conf, 'directConnect', true, 'is set to true for chrome'); + setConf(conf, 'chromeDriver', chromeDriver, 'is determined by the browsers attribute'); + mergeCapabilities(conf, { + browserName: 'chrome', + chromeOptions: { + binary: chromeBin, + args: args, + } + }); + } + if (webTestNamedFiles['FIREFOX']) { + // TODO(gmagolan): implement firefox support for protractor + throw new Error('Firefox not yet support by protractor_web_test_suite'); + + // const firefoxBin = require.resolve(webTestNamedFiles['FIREFOX']) + // const args = []; + // if (headless) { + // args.push("--headless") + // args.push("--marionette") + // } + // setConf(conf, 'seleniumAddress', process.env.WEB_TEST_HTTP_SERVER.trim() + "/wd/hub", 'is + // configured by Bazel for firefox browser') + // mergeCapabilities(conf, { + // browserName: "firefox", + // 'moz:firefoxOptions': { + // binary: firefoxBin, + // args: args, + // } + // }, 'is determined by the browsers attribute'); + } + } else { + console.warn(`Unknown WEB_TEST_METADATA environment '${webTestMetadata['environment']}'`); + } +} + +// Export the complete protractor configuration +if (DEBUG) console.info(`Protractor configuration: ${JSON.stringify(conf, null, 2)}`); + +exports.config = conf; diff --git a/packages/protractor/src/protractor.js b/packages/protractor/src/protractor.js new file mode 100644 index 0000000000..04bcf38edb --- /dev/null +++ b/packages/protractor/src/protractor.js @@ -0,0 +1,3 @@ +#!/usr/bin/env node + +require('protractor/bin/protractor'); diff --git a/packages/protractor/src/protractor_web_test.bzl b/packages/protractor/src/protractor_web_test.bzl new file mode 100644 index 0000000000..ad13c53294 --- /dev/null +++ b/packages/protractor/src/protractor_web_test.bzl @@ -0,0 +1,366 @@ +# Copyright 2017 The Bazel Authors. All rights reserved. +# +# Licensed 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. +"Run end-to-end tests with Protractor" + +load("@build_bazel_rules_nodejs//:defs.bzl", "nodejs_binary") +load("@build_bazel_rules_nodejs//internal/common:expand_into_runfiles.bzl", "expand_path_into_runfiles") +load("@build_bazel_rules_nodejs//internal/common:sources_aspect.bzl", "sources_aspect") +load("@io_bazel_rules_webtesting//web:web.bzl", "web_test_suite") +load("@io_bazel_rules_webtesting//web/internal:constants.bzl", "DEFAULT_WRAPPED_TEST_TAGS") + +_CONF_TMPL = "//:protractor.conf.js" +_DEFUALT_PROTRACTOR = "@npm//@bazel/protractor" +_DEFUALT_PROTRACTOR_ENTRY_POINT = "@npm//:node_modules/@bazel/protractor/protractor.js" + +def _short_path_to_manifest_path(ctx, short_path): + if short_path.startswith("../"): + return short_path[3:] + else: + return ctx.workspace_name + "/" + short_path + +def _protractor_web_test_impl(ctx): + configuration = ctx.actions.declare_file( + "%s.conf.js" % ctx.label.name, + sibling = ctx.outputs.executable, + ) + + files = depset(ctx.files.srcs) + for d in ctx.attr.deps: + if hasattr(d, "node_sources"): + files = depset(transitive = [files, d.node_sources]) + elif hasattr(d, "files"): + files = depset(transitive = [files, d.files]) + + specs = [ + expand_path_into_runfiles(ctx, f.short_path) + for f in files.to_list() + ] + + configuration_sources = [] + if ctx.file.configuration: + configuration_sources = [ctx.file.configuration] + if hasattr(ctx.attr.configuration, "node_sources"): + configuration_sources = ctx.attr.configuration.node_sources.to_list() + + configuration_file = ctx.file.configuration + if hasattr(ctx.attr.configuration, "typescript"): + configuration_file = ctx.attr.configuration.typescript.es5_sources.to_list()[0] + + on_prepare_sources = [] + if ctx.file.on_prepare: + on_prepare_sources = [ctx.file.on_prepare] + if hasattr(ctx.attr.on_prepare, "node_sources"): + on_prepare_sources = ctx.attr.on_prepare.node_sources.to_list() + + on_prepare_file = ctx.file.on_prepare + if hasattr(ctx.attr.on_prepare, "typescript"): + on_prepare_file = ctx.attr.on_prepare.typescript.es5_sources.to_list()[0] + + ctx.actions.expand_template( + output = configuration, + template = ctx.file._conf_tmpl, + substitutions = { + "TMPL_config": expand_path_into_runfiles(ctx, configuration_file.short_path) if configuration_file else "", + "TMPL_on_prepare": expand_path_into_runfiles(ctx, on_prepare_file.short_path) if on_prepare_file else "", + "TMPL_server": ctx.executable.server.short_path if ctx.executable.server else "", + "TMPL_specs": "\n".join([" '%s'," % e for e in specs]), + "TMPL_workspace": ctx.workspace_name, + }, + ) + + runfiles = [configuration] + configuration_sources + on_prepare_sources + + ctx.actions.write( + output = ctx.outputs.executable, + is_executable = True, + content = """#!/usr/bin/env bash +# Immediately exit if any command fails. +set -e + +if [ -e "$RUNFILES_MANIFEST_FILE" ]; then + while read line; do + declare -a PARTS=($line) + if [ "${{PARTS[0]}}" == "{TMPL_protractor}" ]; then + readonly PROTRACTOR=${{PARTS[1]}} + elif [ "${{PARTS[0]}}" == "{TMPL_conf}" ]; then + readonly CONF=${{PARTS[1]}} + fi + done < $RUNFILES_MANIFEST_FILE +else + readonly PROTRACTOR=../{TMPL_protractor} + readonly CONF=../{TMPL_conf} +fi + +export HOME=$(mktemp -d) + +# Print the protractor version in the test log +PROTRACTOR_VERSION=$($PROTRACTOR --version) +echo "Protractor $PROTRACTOR_VERSION" + +# Run the protractor binary +$PROTRACTOR $CONF +""".format( + TMPL_protractor = _short_path_to_manifest_path(ctx, ctx.executable.protractor.short_path), + TMPL_conf = _short_path_to_manifest_path(ctx, configuration.short_path), + ), + ) + return [DefaultInfo( + files = depset([ctx.outputs.executable]), + runfiles = ctx.runfiles( + files = runfiles, + transitive_files = files, + # Propagate protractor_bin and its runfiles + collect_data = True, + collect_default = True, + ), + executable = ctx.outputs.executable, + )] + +_protractor_web_test = rule( + implementation = _protractor_web_test_impl, + test = True, + executable = True, + attrs = { + "srcs": attr.label_list( + doc = "A list of JavaScript test files", + allow_files = [".js"], + ), + "configuration": attr.label( + doc = "Protractor configuration file", + allow_single_file = True, + aspects = [sources_aspect], + ), + "data": attr.label_list( + doc = "Runtime dependencies", + ), + "on_prepare": attr.label( + doc = """A file with a node.js script to run once before all tests run. + If the script exports a function which returns a promise, protractor + will wait for the promise to resolve before beginning tests.""", + allow_single_file = True, + aspects = [sources_aspect], + ), + "protractor": attr.label( + doc = "Protractor executable target", + executable = True, + cfg = "target", + allow_files = True, + ), + "server": attr.label( + doc = "Optional server executable target", + executable = True, + cfg = "target", + allow_files = True, + ), + "deps": attr.label_list( + doc = "Other targets which produce JavaScript such as `ts_library`", + allow_files = True, + aspects = [sources_aspect], + ), + "_conf_tmpl": attr.label( + default = Label(_CONF_TMPL), + allow_single_file = True, + ), + }, +) + +def protractor_web_test( + name, + configuration = None, + on_prepare = None, + srcs = [], + deps = [], + data = [], + server = None, + tags = [], + protractor = _DEFUALT_PROTRACTOR, + protractor_entry_point = _DEFUALT_PROTRACTOR_ENTRY_POINT, + **kwargs): + """Runs a protractor test in a browser. + + Args: + name: The name of the test + configuration: Protractor configuration file. + on_prepare: A file with a node.js script to run once before all tests run. + If the script exports a function which returns a promise, protractor + will wait for the promise to resolve before beginning tests. + srcs: JavaScript source files + deps: Other targets which produce JavaScript such as `ts_library` + data: Runtime dependencies + server: Optional server executable target + tags: Standard Bazel tags, this macro adds one for ibazel + protractor: A label providing the @bazel/protractor npm dependency. + protractor_entry_point: A label providing the @bazel/protractor entry point. + **kwargs: passed through to `_protractor_web_test` + """ + + protractor_bin_name = name + "_protractor_bin" + + nodejs_binary( + name = protractor_bin_name, + entry_point = protractor_entry_point, + data = srcs + deps + data + [protractor], + testonly = 1, + visibility = ["//visibility:private"], + ) + + # Our binary dependency must be in data[] for collect_data to pick it up + # FIXME: maybe we can just ask :protractor_bin_name for its runfiles attr + web_test_data = data + [":" + protractor_bin_name] + if server: + web_test_data += [server] + + _protractor_web_test( + name = name, + configuration = configuration, + on_prepare = on_prepare, + srcs = srcs, + deps = deps, + data = web_test_data, + server = server, + protractor = protractor_bin_name, + tags = tags + [ + # Users don't need to know that this tag is required to run under ibazel + "ibazel_notify_changes", + ], + **kwargs + ) + +def protractor_web_test_suite( + name, + configuration = None, + on_prepare = None, + srcs = [], + deps = [], + data = [], + server = None, + browsers = ["@io_bazel_rules_webtesting//browsers:chromium-local"], + args = None, + browser_overrides = None, + config = None, + flaky = None, + local = None, + shard_count = None, + size = None, + tags = [], + test_suite_tags = None, + timeout = None, + visibility = None, + web_test_data = [], + wrapped_test_tags = None, + protractor = _DEFUALT_PROTRACTOR, + protractor_entry_point = _DEFUALT_PROTRACTOR_ENTRY_POINT, + **remaining_keyword_args): + """Defines a test_suite of web_test targets that wrap a protractor_web_test target. + + Args: + name: The base name of the test. + configuration: Protractor configuration file. + on_prepare: A file with a node.js script to run once before all tests run. + If the script exports a function which returns a promise, protractor + will wait for the promise to resolve before beginning tests. + srcs: JavaScript source files + deps: Other targets which produce JavaScript such as `ts_library` + data: Runtime dependencies + server: Optional server executable target + browsers: A sequence of labels specifying the browsers to use. + args: Args for web_test targets generated by this extension. + browser_overrides: Dictionary; optional; default is an empty dictionary. A + dictionary mapping from browser names to browser-specific web_test + attributes, such as shard_count, flakiness, timeout, etc. For example: + {'//browsers:chrome-native': {'shard_count': 3, 'flaky': 1} + '//browsers:firefox-native': {'shard_count': 1, 'timeout': 100}}. + config: Label; optional; Configuration of web test features. + flaky: A boolean specifying that the test is flaky. If set, the test will + be retried up to 3 times (default: 0) + local: boolean; optional. + shard_count: The number of test shards to use per browser. (default: 1) + size: A string specifying the test size. (default: 'large') + tags: A list of test tag strings to apply to each generated web_test target. + This macro adds a couple for ibazel. + test_suite_tags: A list of tag strings for the generated test_suite. + timeout: A string specifying the test timeout (default: computed from size) + visibility: List of labels; optional. + web_test_data: Data dependencies for the web_test. + wrapped_test_tags: A list of test tag strings to use for the wrapped test + protractor: Protractor entry_point. Defaults to @npm//:node_modules/protractor/bin/protractor + but should be changed to @your_npm_workspace//:node_modules/protractor/bin/protractor if + you are not using @npm for your npm dependencies. + **remaining_keyword_args: Arguments for the wrapped test target. + """ + + # Check explicitly for None so that users can set this to the empty list + if wrapped_test_tags == None: + wrapped_test_tags = DEFAULT_WRAPPED_TEST_TAGS + + size = size or "large" + + wrapped_test_name = name + "_wrapped_test" + protractor_bin_name = name + "_protractor_bin" + + # Users don't need to know that this tag is required to run under ibazel + tags = tags + ["ibazel_notify_changes"] + + nodejs_binary( + name = protractor_bin_name, + entry_point = protractor_entry_point, + data = srcs + deps + data + [protractor], + testonly = 1, + visibility = ["//visibility:private"], + ) + + # Our binary dependency must be in data[] for collect_data to pick it up + # FIXME: maybe we can just ask the :protractor_bin_name for its runfiles attr + web_test_data = web_test_data + [":" + protractor_bin_name] + if server: + web_test_data += [server] + + _protractor_web_test( + name = wrapped_test_name, + configuration = configuration, + on_prepare = on_prepare, + srcs = srcs, + deps = deps, + data = web_test_data, + server = server, + protractor = protractor_bin_name, + args = args, + flaky = flaky, + local = local, + shard_count = shard_count, + size = size, + tags = wrapped_test_tags, + timeout = timeout, + visibility = ["//visibility:private"], + **remaining_keyword_args + ) + + web_test_suite( + name = name, + launcher = ":" + wrapped_test_name, + args = args, + browsers = browsers, + browser_overrides = browser_overrides, + config = config, + data = web_test_data, + flaky = flaky, + local = local, + shard_count = shard_count, + size = size, + tags = tags, + test = wrapped_test_name, + test_suite_tags = test_suite_tags, + timeout = timeout, + visibility = visibility, + ) diff --git a/packages/protractor/src/tsconfig.json b/packages/protractor/src/tsconfig.json new file mode 100644 index 0000000000..6563c38bdf --- /dev/null +++ b/packages/protractor/src/tsconfig.json @@ -0,0 +1,7 @@ +{ + "compilerOptions": { + "noImplicitAny": true, + "lib": ["es2015"], + "types": ["node"] + } +} diff --git a/packages/protractor/test/protractor-2/BUILD.bazel b/packages/protractor/test/protractor-2/BUILD.bazel new file mode 100644 index 0000000000..608176bf91 --- /dev/null +++ b/packages/protractor/test/protractor-2/BUILD.bazel @@ -0,0 +1,76 @@ +load("@build_bazel_rules_nodejs//:defs.bzl", "http_server", "rollup_bundle") +load("@npm_bazel_protractor//:defaults.bzl", "protractor_web_test_suite") +load("@npm_bazel_typescript//:defaults.bzl", "ts_devserver", "ts_library") +load("@npm_bazel_typescript//:index.bzl", "ts_config") + +ts_config( + name = "tsconfig-test", + src = "tsconfig-test.json", + deps = [":tsconfig.json"], +) + +ts_library( + name = "app", + srcs = ["app.ts"], + tsconfig = ":tsconfig.json", +) + +ts_devserver( + name = "devserver", + serving_path = "/bundle.min.js", + static_files = ["index.html"], + deps = [":app"], +) + +rollup_bundle( + name = "bundle", + entry_point = ":app.ts", + deps = [":app"], +) + +http_server( + name = "prodserver", + data = [ + "index.html", + ":bundle.min.js", + ], +) + +ts_library( + name = "ts_spec", + testonly = True, + srcs = ["test.spec.ts"], + tsconfig = ":tsconfig-test", + deps = [ + "@npm//@types/jasmine", + "@npm//@types/selenium-webdriver", + "@npm//protractor", + ], +) + +protractor_web_test_suite( + name = "prodserver_test", + configuration = ":conf.js", + on_prepare = ":on-prepare.js", + server = ":prodserver", + tags = [ + "fix-bazelci-ubuntu", # ubuntu docker images on buildkite missing chrome dependencies & apt-get install not possible + "fix-windows", # http_server (and history_server) do not work on Windows + ], + deps = [ + ":ts_spec", + ], +) + +protractor_web_test_suite( + name = "devserver_test", + configuration = ":conf.js", + on_prepare = ":on-prepare.js", + server = ":devserver", + tags = [ + "fix-bazelci-ubuntu", # ubuntu docker images on buildkite missing chrome dependencies & apt-get install not possible + ], + deps = [ + ":ts_spec", + ], +) diff --git a/packages/protractor/test/protractor-2/app.ts b/packages/protractor/test/protractor-2/app.ts new file mode 100644 index 0000000000..f31a7c9ca9 --- /dev/null +++ b/packages/protractor/test/protractor-2/app.ts @@ -0,0 +1,21 @@ +/** + * @license + * Copyright 2017 The Bazel Authors. All rights reserved. + * + * Licensed 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. + */ + +const el: HTMLDivElement = document.createElement('div'); +el.innerText = 'Hello, Protractor'; +el.className = 'ts1'; +document.body.appendChild(el); diff --git a/packages/protractor/test/protractor-2/conf.js b/packages/protractor/test/protractor-2/conf.js new file mode 100644 index 0000000000..2a66c02eca --- /dev/null +++ b/packages/protractor/test/protractor-2/conf.js @@ -0,0 +1,22 @@ +/** + * @license + * Copyright 2017 The Bazel Authors. All rights reserved. + * + * Licensed 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. + */ + +exports.config = { + onPrepare: function() { + global.userOnPrepareGotCalled = true; + } +}; diff --git a/packages/protractor/test/protractor-2/index.html b/packages/protractor/test/protractor-2/index.html new file mode 100644 index 0000000000..256a75f74f --- /dev/null +++ b/packages/protractor/test/protractor-2/index.html @@ -0,0 +1,9 @@ + + + + protractor test + + + + + diff --git a/packages/protractor/test/protractor-2/on-prepare.js b/packages/protractor/test/protractor-2/on-prepare.js new file mode 100644 index 0000000000..adc7a33b06 --- /dev/null +++ b/packages/protractor/test/protractor-2/on-prepare.js @@ -0,0 +1,31 @@ +/** + * @license + * Copyright 2017 The Bazel Authors. All rights reserved. + * + * Licensed 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. + */ + +const protractorUtils = require('@bazel/protractor/protractor-utils'); +const protractor = require('protractor'); + +module.exports = function(config) { + if (!global.userOnPrepareGotCalled) { + throw new Error('Expecting user configuration onPrepare to have been called'); + } + const portFlag = /prodserver(\.exe)?$/.test(config.server) ? '-p' : '-port'; + return protractorUtils.runServer(config.workspace, config.server, portFlag, []) + .then(serverSpec => { + const serverUrl = `http://localhost:${serverSpec.port}`; + protractor.browser.baseUrl = serverUrl; + }); +}; diff --git a/packages/protractor/test/protractor-2/test.spec.ts b/packages/protractor/test/protractor-2/test.spec.ts new file mode 100644 index 0000000000..d2f6f7c4ad --- /dev/null +++ b/packages/protractor/test/protractor-2/test.spec.ts @@ -0,0 +1,35 @@ +/** + * @license + * Copyright 2017 The Bazel Authors. All rights reserved. + * + * Licensed 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 {browser, by, element, ExpectedConditions} from 'protractor'; + + +// This test uses Protractor without Angular, so disable Angular features +browser.waitForAngularEnabled(false); + +describe('app', () => { + beforeAll(() => { + browser.get(''); + browser.wait(ExpectedConditions.presenceOf(element(by.css('div.ts1'))), 100000); + }); + + it('should display: Hello, Protractor', (done) => { + const div = element(by.css('div.ts1')); + div.getText().then(t => expect(t).toEqual(`Hello, Protractor`)); + done(); + }); +}); diff --git a/packages/protractor/test/protractor-2/tsconfig-test.json b/packages/protractor/test/protractor-2/tsconfig-test.json new file mode 100644 index 0000000000..d4165e8a6a --- /dev/null +++ b/packages/protractor/test/protractor-2/tsconfig-test.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "types": ["jasmine"] + } +} diff --git a/packages/protractor/test/protractor-2/tsconfig.json b/packages/protractor/test/protractor-2/tsconfig.json new file mode 100644 index 0000000000..d18dc325cc --- /dev/null +++ b/packages/protractor/test/protractor-2/tsconfig.json @@ -0,0 +1,6 @@ +{ + "compilerOptions": { + "lib": ["dom", "es2015"], + "types": [] + } +} diff --git a/packages/protractor/test/protractor-utils/BUILD.bazel b/packages/protractor/test/protractor-utils/BUILD.bazel new file mode 100644 index 0000000000..2d079aea61 --- /dev/null +++ b/packages/protractor/test/protractor-utils/BUILD.bazel @@ -0,0 +1,32 @@ +load("@build_bazel_rules_nodejs//:defs.bzl", "nodejs_binary") +load("@npm_bazel_jasmine//:defaults.bzl", "jasmine_node_test") +load("@npm_bazel_typescript//:defaults.bzl", "ts_library") + +ts_library( + name = "protractor_utils_tests_lib", + testonly = True, + srcs = ["index_test.ts"], + deps = [ + "@npm//@types/jasmine", + "@npm_bazel_protractor//:utils_lib", + ], +) + +nodejs_binary( + name = "fake-devserver", + testonly = True, + data = [ + "fake-devserver.js", + "@npm//minimist", + ], + entry_point = ":fake-devserver.ts", +) + +jasmine_node_test( + name = "protractor_utils_tests", + size = "small", + srcs = [":protractor_utils_tests_lib"], + data = [ + ":fake-devserver", + ], +) diff --git a/packages/protractor/test/protractor-utils/fake-devserver.js b/packages/protractor/test/protractor-utils/fake-devserver.js new file mode 100644 index 0000000000..8af34ed290 --- /dev/null +++ b/packages/protractor/test/protractor-utils/fake-devserver.js @@ -0,0 +1,32 @@ +/** + * @license + * Copyright 2017 The Bazel Authors. All rights reserved. + * + * Licensed 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. + */ + +const http = require('http'); +const minimist = require('minimist'); + +const {port} = minimist(process.argv); +const server = new http.Server(); + +// Basic request handler so that it could respond to fake requests. +server.on('request', (req, res) => { + res.writeHead(200, {'Content-Type': 'text/plain'}); + res.end('Running'); +}); + +server.listen(port); + +console.info('Server running on port:', port); diff --git a/packages/protractor/test/protractor-utils/index_test.ts b/packages/protractor/test/protractor-utils/index_test.ts new file mode 100644 index 0000000000..e851d9a61a --- /dev/null +++ b/packages/protractor/test/protractor-utils/index_test.ts @@ -0,0 +1,27 @@ +/** + * @license + * Copyright 2017 The Bazel Authors. All rights reserved. + * + * Licensed 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 {runServer} from '@bazel/protractor/protractor-utils'; + +describe('Bazel protractor utils', () => { + it('should be able to start devserver', async () => { + // Test will automatically time out if the server couldn't be launched as expected. + await runServer( + 'build_bazel_rules_nodejs', 'packages/protractor/test/protractor-utils/fake-devserver', + '--port', []); + }); +}); diff --git a/packages/protractor/test/protractor/BUILD.bazel b/packages/protractor/test/protractor/BUILD.bazel new file mode 100644 index 0000000000..9b30863424 --- /dev/null +++ b/packages/protractor/test/protractor/BUILD.bazel @@ -0,0 +1,36 @@ +load("@npm_bazel_protractor//:defaults.bzl", "protractor_web_test_suite") +load("@npm_bazel_typescript//:defaults.bzl", "ts_library") + +ts_library( + name = "ts_spec", + testonly = True, + srcs = ["test.spec.ts"], + tsconfig = ":tsconfig.json", + deps = [ + "@npm//@types/jasmine", + "@npm//@types/selenium-webdriver", + "@npm//protractor", + ], +) + +ts_library( + name = "ts_conf", + testonly = True, + srcs = ["conf.ts"], + tsconfig = ":tsconfig.json", + deps = [ + "@npm//protractor", + "@npm_bazel_protractor//:utils_lib", + ], +) + +protractor_web_test_suite( + name = "test", + configuration = ":ts_conf", + tags = [ + "fix-bazelci-ubuntu", # ubuntu docker images on buildkite missing chrome dependencies & apt-get install not possible + ], + deps = [ + ":ts_spec", + ], +) diff --git a/packages/protractor/test/protractor/conf.ts b/packages/protractor/test/protractor/conf.ts new file mode 100644 index 0000000000..3b7c953249 --- /dev/null +++ b/packages/protractor/test/protractor/conf.ts @@ -0,0 +1,43 @@ +/** + * @license + * Copyright 2017 The Bazel Authors. All rights reserved. + * + * Licensed 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 * as protractorUtils from '@bazel/protractor/protractor-utils'; +import {browser} from 'protractor'; + +const http = require('http'); + +exports.config = { + onPrepare() { + return protractorUtils.findFreeTcpPort().then(port => { + const app = new http.Server(); + + app.on('request', (req, res) => { + res.writeHead(200, {'Content-Type': 'text/plain'}); + res.write('Hello World'); + res.end('\n'); + }); + + browser.baseUrl = `http://localhost:${port}`; + + return new Promise(resolve => { + app.listen(port, () => { + resolve(); + }); + }); + }); + } +}; diff --git a/packages/protractor/test/protractor/test.spec.ts b/packages/protractor/test/protractor/test.spec.ts new file mode 100644 index 0000000000..0ef67da3f1 --- /dev/null +++ b/packages/protractor/test/protractor/test.spec.ts @@ -0,0 +1,27 @@ +/** + * @license + * Copyright 2017 The Bazel Authors. All rights reserved. + * + * Licensed 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 {$, browser} from 'protractor'; + +describe('Basic test', () => { + it('should say hello world', () => { + browser.waitForAngularEnabled(false); + browser.get('/'); + + expect($('body').getText()).toContain('Hello World'); + }); +}); diff --git a/packages/protractor/test/protractor/tsconfig.json b/packages/protractor/test/protractor/tsconfig.json new file mode 100644 index 0000000000..b09f8cf9dc --- /dev/null +++ b/packages/protractor/test/protractor/tsconfig.json @@ -0,0 +1,6 @@ +{ + "compilerOptions": { + "lib": ["es2015"], + "types": ["jasmine"] + } +} diff --git a/scripts/packages.sh b/scripts/packages.sh index fcd950eee0..3ad2149bb9 100644 --- a/scripts/packages.sh +++ b/scripts/packages.sh @@ -5,4 +5,4 @@ set -eu -o pipefail # -u: errors if an variable is referenced before being set # -o pipefail: causes a pipeline to produce a failure return code if any command errors -export readonly PACKAGES=( create hide-bazel-files jasmine typescript karma labs ) +export readonly PACKAGES=( create hide-bazel-files jasmine typescript karma protractor labs ) diff --git a/yarn.lock b/yarn.lock index e1966e5d63..817cd94d1c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -345,6 +345,11 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-10.14.13.tgz#ac786d623860adf39a3f51d629480aacd6a6eec7" integrity sha512-yN/FNNW1UYsRR1wwAoyOwqvDuLDtVXnaJTZ898XIw/Q5cCaeVAlVwvsmXLX5PuiScBYwZsZU4JYSHB3TvfdwvQ== +"@types/q@^0.0.32": + version "0.0.32" + resolved "https://registry.yarnpkg.com/@types/q/-/q-0.0.32.tgz#bd284e57c84f1325da702babfc82a5328190c0c5" + integrity sha1-vShOV8hPEyXacCur/IKlMoGQwMU= + "@types/resolve@0.0.8": version "0.0.8" resolved "https://registry.yarnpkg.com/@types/resolve/-/resolve-0.0.8.tgz#f26074d238e02659e323ce1a13d041eee280e194" @@ -352,6 +357,11 @@ dependencies: "@types/node" "*" +"@types/selenium-webdriver@^3.0.0": + version "3.0.16" + resolved "https://registry.yarnpkg.com/@types/selenium-webdriver/-/selenium-webdriver-3.0.16.tgz#50a4755f8e33edacd9c406729e9b930d2451902a" + integrity sha512-lMC2G0ItF2xv4UCiwbJGbnJlIuUixHrioOhNGHSCsYCJ8l4t9hMCUimCytvFv7qy6AfSzRxhRHoGa+UqaqwyeA== + "@types/tapable@*": version "1.0.4" resolved "https://registry.yarnpkg.com/@types/tapable/-/tapable-1.0.4.tgz#b4ffc7dc97b498c969b360a41eee247f82616370" @@ -606,6 +616,18 @@ add-stream@^1.0.0: resolved "https://registry.yarnpkg.com/add-stream/-/add-stream-1.0.0.tgz#6a7990437ca736d5e1288db92bd3266d5f5cb2aa" integrity sha1-anmQQ3ynNtXhKI25K9MmbV9csqo= +adm-zip@^0.4.9: + version "0.4.13" + resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.4.13.tgz#597e2f8cc3672151e1307d3e95cddbc75672314a" + integrity sha512-fERNJX8sOXfel6qCBCMPvZLzENBEhZTzKqg6vrOW5pvoEaQuJhRU4ndTAh6lHOxn1I6jnz2NHra56ZODM751uw== + +agent-base@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.3.0.tgz#8165f01c436009bccad0b1d122f05ed770efc6ee" + integrity sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg== + dependencies: + es6-promisify "^5.0.0" + ajv-errors@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/ajv-errors/-/ajv-errors-1.0.1.tgz#f35986aceb91afadec4102fbd85014950cefa64d" @@ -616,7 +638,7 @@ ajv-keywords@^3.1.0: resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.4.1.tgz#ef916e271c64ac12171fd8384eaae6b2345854da" integrity sha512-RO1ibKvd27e6FEShVFfPALuHI3WjSVNeK5FIsmme/LYRNxjKuNj+Dt7bucLa6NdSv3JcVTyMlm9kGR84z1XpaQ== -ajv@^6.1.0: +ajv@^6.1.0, ajv@^6.5.5: version "6.10.2" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.10.2.tgz#d3cea04d6b017b2894ad69040fec8b623eb4bd52" integrity sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw== @@ -636,6 +658,11 @@ ansi-regex@^3.0.0: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= +ansi-styles@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" + integrity sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4= + ansi-styles@^3.2.0, ansi-styles@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" @@ -716,7 +743,14 @@ array-reduce@~0.0.0: resolved "https://registry.yarnpkg.com/array-reduce/-/array-reduce-0.0.0.tgz#173899d3ffd1c7d9383e4479525dbe278cab5f2b" integrity sha1-FziZ0//Rx9k4PkR5Ul2+J4yrXys= -array-uniq@^1.0.3: +array-union@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" + integrity sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk= + dependencies: + array-uniq "^1.0.1" + +array-uniq@^1.0.1, array-uniq@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" integrity sha1-r2rId6Jcx/dOBYiUdThY39sk/bY= @@ -726,7 +760,7 @@ array-unique@^0.3.2: resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg= -arrify@^1.0.1: +arrify@^1.0.0, arrify@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" integrity sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0= @@ -740,6 +774,18 @@ asn1.js@^4.0.0: inherits "^2.0.1" minimalistic-assert "^1.0.0" +asn1@~0.2.3: + version "0.2.4" + resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136" + integrity sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg== + dependencies: + safer-buffer "~2.1.0" + +assert-plus@1.0.0, assert-plus@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" + integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU= + assert@^1.1.1: version "1.5.0" resolved "https://registry.yarnpkg.com/assert/-/assert-1.5.0.tgz#55c109aaf6e0aefdb3dc4b71240c70bf574b18eb" @@ -775,11 +821,26 @@ async@^1.5.2: resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" integrity sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo= +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= + atob@^2.1.1: version "2.1.2" resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== +aws-sign2@~0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" + integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg= + +aws4@^1.8.0: + version "1.8.0" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.8.0.tgz#f0e003d9ca9e7f59c7a508945d7b2ef9a04a542f" + integrity sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ== + babel-polyfill@6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-polyfill/-/babel-polyfill-6.26.0.tgz#379937abc67d7895970adc621f284cd966cf2153" @@ -823,6 +884,13 @@ base@^0.11.1: "bazel_workspaces@file:./tools/npm_packages/bazel_workspaces": version "0.0.2" +bcrypt-pbkdf@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" + integrity sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4= + dependencies: + tweetnacl "^0.14.3" + big.js@^5.2.2: version "5.2.2" resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328" @@ -833,6 +901,13 @@ binary-extensions@^1.0.0: resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.13.1.tgz#598afe54755b2868a5330d2aff9d4ebb53209b65" integrity sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw== +blocking-proxy@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/blocking-proxy/-/blocking-proxy-1.0.1.tgz#81d6fd1fe13a4c0d6957df7f91b75e98dac40cb2" + integrity sha512-KE8NFMZr3mN2E0HcvCgRtX7DjhiIQrwle+nSVJVC/yqFb9+xznHl2ZcoBp2L9qzkI4t4cBFJ1efXF8Dwi132RA== + dependencies: + minimist "^1.2.0" + bluebird@^3.5.5: version "3.5.5" resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.5.tgz#a8d0afd73251effbbd5fe384a77d73003c17a71f" @@ -1004,6 +1079,13 @@ browserify@16.2.3: vm-browserify "^1.0.0" xtend "^4.0.0" +browserstack@^1.5.1: + version "1.5.2" + resolved "https://registry.yarnpkg.com/browserstack/-/browserstack-1.5.2.tgz#17d8bb76127a1cc0ea416424df80d218f803673f" + integrity sha512-+6AFt9HzhKykcPF79W6yjEUJcdvZOV0lIXdkORXMJftGrDl0OKWqRF4GHqpDNkxiceDT/uB7Fb/aDwktvXX7dg== + dependencies: + https-proxy-agent "^2.2.1" + buffer-from@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" @@ -1132,6 +1214,11 @@ camelcase@^4.1.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" integrity sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0= +caseless@~0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" + integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= + chalk@2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.1.tgz#523fe2678aec7b04e8041909292fe8b17059b796" @@ -1141,6 +1228,17 @@ chalk@2.3.1: escape-string-regexp "^1.0.5" supports-color "^5.2.0" +chalk@^1.1.1, chalk@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" + integrity sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg= + dependencies: + ansi-styles "^2.2.1" + escape-string-regexp "^1.0.2" + has-ansi "^2.0.0" + strip-ansi "^3.0.0" + supports-color "^2.0.0" + chalk@^2.0.1: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" @@ -1257,6 +1355,13 @@ combine-source-map@^0.8.0, combine-source-map@~0.8.0: lodash.memoize "~3.0.3" source-map "~0.5.3" +combined-stream@^1.0.6, combined-stream@~1.0.6: + version "1.0.8" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" + integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== + dependencies: + delayed-stream "~1.0.0" + commander@^2.13.0: version "2.19.0" resolved "https://registry.yarnpkg.com/commander/-/commander-2.19.0.tgz#f6198aa84e5b83c46054b94ddedbfed5ee9ff12a" @@ -1525,7 +1630,7 @@ core-js@^2.4.0, core-js@^2.5.0: resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.9.tgz#6b4b214620c834152e179323727fc19741b084f2" integrity sha512-HOpZf6eXmnl7la+cUdMnLvUxKNqLUzJvgIziQ0DiF3JwSImNphIqdGqzj6hIKyX04MmV0poclQ7+wjWvxQyR2A== -core-util-is@^1.0.2, core-util-is@~1.0.0: +core-util-is@1.0.2, core-util-is@^1.0.2, core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= @@ -1650,6 +1755,13 @@ dash-ast@^1.0.0: resolved "https://registry.yarnpkg.com/dash-ast/-/dash-ast-1.0.0.tgz#12029ba5fb2f8aa6f0a861795b23c1b4b6c27d37" integrity sha512-Vy4dx7gquTeMcQR/hDkYLGUnwVil6vk4FOOct+djUnHOUWt+zJPJAaRIXaAFkPXtJjvlY7o3rfRu0/3hpnwoUA== +dashdash@^1.12.0: + version "1.14.1" + resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" + integrity sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA= + dependencies: + assert-plus "^1.0.0" + date-now@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b" @@ -1729,6 +1841,24 @@ defined@^1.0.0: resolved "https://registry.yarnpkg.com/defined/-/defined-1.0.0.tgz#c98d9bcef75674188e110969151199e39b1fa693" integrity sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM= +del@^2.2.0: + version "2.2.2" + resolved "https://registry.yarnpkg.com/del/-/del-2.2.2.tgz#c12c981d067846c84bcaf862cff930d907ffd1a8" + integrity sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag= + dependencies: + globby "^5.0.0" + is-path-cwd "^1.0.0" + is-path-in-cwd "^1.0.0" + object-assign "^4.0.1" + pify "^2.0.0" + pinkie-promise "^2.0.0" + rimraf "^2.2.8" + +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= + delegates@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" @@ -1814,6 +1944,14 @@ duplexify@^3.4.2, duplexify@^3.6.0: readable-stream "^2.0.0" stream-shift "^1.0.0" +ecc-jsbn@~0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" + integrity sha1-OoOpBOVDUyh4dMVkt1SThoSamMk= + dependencies: + jsbn "~0.1.0" + safer-buffer "^2.1.0" + elliptic@^6.0.0: version "6.4.1" resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.4.1.tgz#c2d0b7776911b86722c632c3c06c60f2f819939a" @@ -1862,7 +2000,19 @@ error-ex@^1.2.0, error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" -escape-string-regexp@^1.0.5: +es6-promise@^4.0.3: + version "4.2.8" + resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.8.tgz#4eb21594c972bc40553d276e510539143db53e0a" + integrity sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w== + +es6-promisify@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-5.0.0.tgz#5109d62f3e56ea967c4b63505aef08291c8a5203" + integrity sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM= + dependencies: + es6-promise "^4.0.3" + +escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= @@ -1996,6 +2146,11 @@ execa@^1.0.0: signal-exit "^3.0.0" strip-eof "^1.0.0" +exit@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" + integrity sha1-BjJjj42HfMghB9MKD/8aF8uhzQw= + expand-brackets@^2.1.4: version "2.1.4" resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" @@ -2024,6 +2179,11 @@ extend-shallow@^3.0.0, extend-shallow@^3.0.2: assign-symbols "^1.0.0" is-extendable "^1.0.1" +extend@~3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" + integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== + extglob@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543" @@ -2038,6 +2198,16 @@ extglob@^2.0.4: snapdragon "^0.8.1" to-regex "^3.0.1" +extsprintf@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" + integrity sha1-lpGEQOMEGnpBT4xS48V06zw+HgU= + +extsprintf@^1.2.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" + integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8= + fast-deep-equal@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49" @@ -2120,6 +2290,20 @@ foreground-child@^1.5.6: cross-spawn "^4" signal-exit "^3.0.0" +forever-agent@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" + integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= + +form-data@~2.3.2: + version "2.3.3" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" + integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.6" + mime-types "^2.1.12" + fragment-cache@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" @@ -2237,6 +2421,13 @@ get-value@^2.0.3, get-value@^2.0.6: resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" integrity sha1-3BXKHGcjh8p2vTesCjlbogQqLCg= +getpass@^0.1.1: + version "0.1.7" + resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" + integrity sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo= + dependencies: + assert-plus "^1.0.0" + git-raw-commits@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/git-raw-commits/-/git-raw-commits-2.0.0.tgz#d92addf74440c14bcc5c83ecce3fb7f8a79118b5" @@ -2302,10 +2493,10 @@ glob@^7.0.0: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^7.1.0, glob@^7.1.2, glob@^7.1.3: - version "7.1.3" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" - integrity sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ== +glob@^7.0.3, glob@^7.0.6, glob@^7.1.4: + version "7.1.4" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.4.tgz#aa608a2f6c577ad357e1ae5a5c26d9a8d1969255" + integrity sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A== dependencies: fs.realpath "^1.0.0" inflight "^1.0.4" @@ -2314,10 +2505,10 @@ glob@^7.1.0, glob@^7.1.2, glob@^7.1.3: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^7.1.4: - version "7.1.4" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.4.tgz#aa608a2f6c577ad357e1ae5a5c26d9a8d1969255" - integrity sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A== +glob@^7.1.0, glob@^7.1.2, glob@^7.1.3: + version "7.1.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" + integrity sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ== dependencies: fs.realpath "^1.0.0" inflight "^1.0.4" @@ -2333,6 +2524,18 @@ global-dirs@^0.1.1: dependencies: ini "^1.3.4" +globby@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/globby/-/globby-5.0.0.tgz#ebd84667ca0dbb330b99bcfc68eac2bc54370e0d" + integrity sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0= + dependencies: + array-union "^1.0.1" + arrify "^1.0.0" + glob "^7.0.3" + object-assign "^4.0.1" + pify "^2.0.0" + pinkie-promise "^2.0.0" + graceful-fs@^4.1.11, graceful-fs@^4.1.15: version "4.2.0" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.0.tgz#8d8fdc73977cb04104721cb53666c1ca64cd328b" @@ -2354,6 +2557,26 @@ handlebars@^4.0.3, handlebars@^4.1.0: optionalDependencies: uglify-js "^3.1.4" +har-schema@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" + integrity sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI= + +har-validator@~5.1.0: + version "5.1.3" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.3.tgz#1ef89ebd3e4996557675eed9893110dc350fa080" + integrity sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g== + dependencies: + ajv "^6.5.5" + har-schema "^2.0.0" + +has-ansi@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" + integrity sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE= + dependencies: + ansi-regex "^2.0.0" + has-flag@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" @@ -2445,11 +2668,28 @@ htmlescape@^1.1.0: resolved "https://registry.yarnpkg.com/htmlescape/-/htmlescape-1.1.1.tgz#3a03edc2214bca3b66424a3e7959349509cb0351" integrity sha1-OgPtwiFLyjtmQko+eVk0lQnLA1E= +http-signature@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" + integrity sha1-muzZJRFHcvPZW2WmCruPfBj7rOE= + dependencies: + assert-plus "^1.0.0" + jsprim "^1.2.2" + sshpk "^1.7.0" + https-browserify@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" integrity sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM= +https-proxy-agent@^2.2.1: + version "2.2.2" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.2.tgz#271ea8e90f836ac9f119daccd39c19ff7dfb0793" + integrity sha512-c8Ndjc9Bkpfx/vCJueCPy0jlP4ccCCSNDp8xwCZzPjKJUm+B+u9WX2x98Qx4n1PiMNTWo3D7KK5ifNV/yJyRzg== + dependencies: + agent-base "^4.3.0" + debug "^3.1.0" + husky@1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/husky/-/husky-1.3.1.tgz#26823e399300388ca2afff11cfa8a86b0033fae0" @@ -2490,6 +2730,11 @@ ignore-walk@^3.0.1: dependencies: minimatch "^3.0.4" +immediate@~3.0.5: + version "3.0.6" + resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.0.6.tgz#9db1dbd0faf8de6fbe0f5dd5e56bb606280de69b" + integrity sha1-nbHb0Pr43m++D13V5Wu2BigN5ps= + import-fresh@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-2.0.0.tgz#d81355c15612d386c61f9ddd3922d4304822a546" @@ -2728,6 +2973,25 @@ is-obj@^1.0.0: resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f" integrity sha1-PkcprB9f3gJc19g6iW2rn09n2w8= +is-path-cwd@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d" + integrity sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0= + +is-path-in-cwd@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz#5ac48b345ef675339bd6c7a48a912110b241cf52" + integrity sha512-FjV1RTW48E7CWM7eE/J2NJvAEEVektecDBVBE5Hh3nM1Jd0kvhHtX68Pr3xsDf857xt3Y4AkwVULK1Vku62aaQ== + dependencies: + is-path-inside "^1.0.0" + +is-path-inside@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.1.tgz#8ef5b7de50437a3fdca6b4e865ef7aa55cb48036" + integrity sha1-jvW33lBDej/cprToZe96pVy0gDY= + dependencies: + path-is-inside "^1.0.1" + is-plain-obj@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" @@ -2759,6 +3023,11 @@ is-text-path@^2.0.0: dependencies: text-extensions "^2.0.0" +is-typedarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" + integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= + is-utf8@^0.2.0: version "0.2.1" resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" @@ -2806,6 +3075,11 @@ isobject@^3.0.0, isobject@^3.0.1: resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8= +isstream@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" + integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= + istanbul-lib-coverage@^1.2.0, istanbul-lib-coverage@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.2.1.tgz#ccf7edcd0a0bb9b8f729feeb0930470f9af664f0" @@ -2828,11 +3102,25 @@ istanbul-reports@^1.3.0: dependencies: handlebars "^4.0.3" +jasmine-core@~2.8.0: + version "2.8.0" + resolved "https://registry.yarnpkg.com/jasmine-core/-/jasmine-core-2.8.0.tgz#bcc979ae1f9fd05701e45e52e65d3a5d63f1a24e" + integrity sha1-vMl5rh+f0FcB5F5S5l06XWPxok4= + jasmine-core@~3.4.0: version "3.4.0" resolved "https://registry.yarnpkg.com/jasmine-core/-/jasmine-core-3.4.0.tgz#2a74618e966026530c3518f03e9f845d26473ce3" integrity sha512-HU/YxV4i6GcmiH4duATwAbJQMlE0MsDIR5XmSVxURxKHn3aGAdbY1/ZJFmVRbKtnLwIxxMJD7gYaPsypcbYimg== +jasmine@2.8.0: + version "2.8.0" + resolved "https://registry.yarnpkg.com/jasmine/-/jasmine-2.8.0.tgz#6b089c0a11576b1f16df11b80146d91d4e8b8a3e" + integrity sha1-awicChFXax8W3xG4AUbZHU6Lij4= + dependencies: + exit "^0.1.2" + glob "^7.0.6" + jasmine-core "~2.8.0" + jasmine@~3.4.0: version "3.4.0" resolved "https://registry.yarnpkg.com/jasmine/-/jasmine-3.4.0.tgz#0fa68903ff0c9697459cd044b44f4dcef5ec8bdc" @@ -2841,6 +3129,11 @@ jasmine@~3.4.0: glob "^7.1.3" jasmine-core "~3.4.0" +jasminewd2@^2.1.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/jasminewd2/-/jasminewd2-2.2.0.tgz#e37cf0b17f199cce23bea71b2039395246b4ec4e" + integrity sha1-43zwsX8ZnM4jvqcbIDk5Uka07E4= + js-yaml@^3.13.0, js-yaml@^3.13.1: version "3.13.1" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" @@ -2849,6 +3142,11 @@ js-yaml@^3.13.0, js-yaml@^3.13.1: argparse "^1.0.7" esprima "^4.0.0" +jsbn@~0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" + integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= + json-parse-better-errors@^1.0.1, json-parse-better-errors@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" @@ -2859,6 +3157,11 @@ json-schema-traverse@^0.4.1: resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== +json-schema@0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" + integrity sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM= + json-stable-stringify@~0.0.0: version "0.0.1" resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-0.0.1.tgz#611c23e814db375527df851193db59dd2af27f45" @@ -2866,7 +3169,7 @@ json-stable-stringify@~0.0.0: dependencies: jsonify "~0.0.0" -json-stringify-safe@^5.0.1: +json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= @@ -2888,6 +3191,26 @@ jsonparse@^1.2.0: resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" integrity sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA= +jsprim@^1.2.2: + version "1.4.1" + resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" + integrity sha1-MT5mvB5cwG5Di8G3SZwuXFastqI= + dependencies: + assert-plus "1.0.0" + extsprintf "1.3.0" + json-schema "0.2.3" + verror "1.10.0" + +jszip@^3.1.3: + version "3.2.2" + resolved "https://registry.yarnpkg.com/jszip/-/jszip-3.2.2.tgz#b143816df7e106a9597a94c77493385adca5bd1d" + integrity sha512-NmKajvAFQpbg3taXQXr/ccS2wcucR1AZ+NtyWp2Nq7HHVsXhcJFR8p0Baf32C2yVvBylFWVeKf+WI2AnvlPhpA== + dependencies: + lie "~3.3.0" + pako "~1.0.2" + readable-stream "~2.3.6" + set-immediate-shim "~1.0.1" + just-extend@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/just-extend/-/just-extend-4.0.2.tgz#f3f47f7dfca0f989c55410a7ebc8854b07108afc" @@ -2941,6 +3264,13 @@ levn@~0.3.0: prelude-ls "~1.1.2" type-check "~0.3.2" +lie@~3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/lie/-/lie-3.3.0.tgz#dcf82dee545f46074daf200c7c1c5a08e0f40f6a" + integrity sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ== + dependencies: + immediate "~3.0.5" + load-json-file@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" @@ -3199,6 +3529,18 @@ miller-rabin@^4.0.0: bn.js "^4.0.0" brorand "^1.0.1" +mime-db@1.40.0: + version "1.40.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.40.0.tgz#a65057e998db090f732a68f6c276d387d4126c32" + integrity sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA== + +mime-types@^2.1.12, mime-types@~2.1.19: + version "2.1.24" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.24.tgz#b6f8d0b3e951efb77dedeca194cff6d16f676f81" + integrity sha512-WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ== + dependencies: + mime-db "1.40.0" + mimic-fn@^1.0.0: version "1.2.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" @@ -3521,6 +3863,11 @@ number-is-nan@^1.0.0: resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0= +oauth-sign@~0.9.0: + version "0.9.0" + resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" + integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== + object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" @@ -3556,7 +3903,7 @@ once@^1.3.0, once@^1.3.1, once@^1.4.0: dependencies: wrappy "1" -optimist@^0.6.1: +optimist@^0.6.1, optimist@~0.6.0: version "0.6.1" resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" integrity sha1-2j6nRob6IaGaERwybpDrFaAZZoY= @@ -3595,7 +3942,7 @@ os-locale@^2.0.0: lcid "^1.0.0" mem "^1.1.0" -os-tmpdir@^1.0.0: +os-tmpdir@^1.0.0, os-tmpdir@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= @@ -3651,7 +3998,7 @@ p-try@^2.0.0: resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== -pako@~1.0.5: +pako@~1.0.2, pako@~1.0.5: version "1.0.10" resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.10.tgz#4328badb5086a426aa90f541977d4955da5c9732" integrity sha512-0DTvPVU3ed8+HNXOu5Bs+o//Mbdj9VNQMUOe9oKCwh8l0GNwpTDMKCWbRjgtD291AWnkAgkqA/LOnQS8AmS1tw== @@ -3743,6 +4090,11 @@ path-is-absolute@^1.0.0, path-is-absolute@^1.0.1: resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= +path-is-inside@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" + integrity sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM= + path-key@^2.0.0, path-key@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" @@ -3797,6 +4149,11 @@ pbkdf2@^3.0.3: safe-buffer "^5.0.1" sha.js "^2.4.8" +performance-now@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" + integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= + pify@^2.0.0, pify@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" @@ -3887,6 +4244,27 @@ protobufjs@6.8.8: "@types/node" "^10.1.0" long "^4.0.0" +protractor@^5.4.2: + version "5.4.2" + resolved "https://registry.yarnpkg.com/protractor/-/protractor-5.4.2.tgz#329efe37f48b2141ab9467799be2d4d12eb48c13" + integrity sha512-zlIj64Cr6IOWP7RwxVeD8O4UskLYPoyIcg0HboWJL9T79F1F0VWtKkGTr/9GN6BKL+/Q/GmM7C9kFVCfDbP5sA== + dependencies: + "@types/q" "^0.0.32" + "@types/selenium-webdriver" "^3.0.0" + blocking-proxy "^1.0.0" + browserstack "^1.5.1" + chalk "^1.1.3" + glob "^7.0.3" + jasmine "2.8.0" + jasminewd2 "^2.1.0" + optimist "~0.6.0" + q "1.4.1" + saucelabs "^1.5.0" + selenium-webdriver "3.6.0" + source-map-support "~0.4.0" + webdriver-js-extender "2.1.0" + webdriver-manager "^12.0.6" + prr@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" @@ -3897,6 +4275,11 @@ pseudomap@^1.0.2: resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" integrity sha1-8FKijacOYYkX7wqKw0wa5aaChrM= +psl@^1.1.24: + version "1.2.0" + resolved "https://registry.yarnpkg.com/psl/-/psl-1.2.0.tgz#df12b5b1b3a30f51c329eacbdef98f3a6e136dc6" + integrity sha512-GEn74ZffufCmkDDLNcl3uuyF/aSD6exEyh1v/ZSdAomB82t6G9hzJVRx0jBmLDW+VfZqks3aScmMw9DszwUalA== + public-encrypt@^4.0.0: version "4.0.3" resolved "https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.3.tgz#4fcc9d77a07e48ba7527e7cbe0de33d0701331e0" @@ -3939,7 +4322,7 @@ punycode@1.3.2: resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" integrity sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0= -punycode@^1.2.4, punycode@^1.3.2: +punycode@^1.2.4, punycode@^1.3.2, punycode@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" integrity sha1-wNWmOycYgArY4esPpSachN1BhF4= @@ -3949,11 +4332,21 @@ punycode@^2.1.0: resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== -q@^1.5.1: +q@1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/q/-/q-1.4.1.tgz#55705bcd93c5f3673530c2c2cbc0c2b3addc286e" + integrity sha1-VXBbzZPF82c1MMLCy8DCs63cKG4= + +q@^1.4.1, q@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" integrity sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc= +qs@~6.5.2: + version "6.5.2" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" + integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== + querystring-es3@^0.2.0, querystring-es3@~0.2.0: version "0.2.1" resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73" @@ -4146,6 +4539,32 @@ repeating@^2.0.0: dependencies: is-finite "^1.0.0" +request@^2.87.0: + version "2.88.0" + resolved "https://registry.yarnpkg.com/request/-/request-2.88.0.tgz#9c2fca4f7d35b592efe57c7f0a55e81052124fef" + integrity sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg== + dependencies: + aws-sign2 "~0.7.0" + aws4 "^1.8.0" + caseless "~0.12.0" + combined-stream "~1.0.6" + extend "~3.0.2" + forever-agent "~0.6.1" + form-data "~2.3.2" + har-validator "~5.1.0" + http-signature "~1.2.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.19" + oauth-sign "~0.9.0" + performance-now "^2.1.0" + qs "~6.5.2" + safe-buffer "^5.1.2" + tough-cookie "~2.4.3" + tunnel-agent "^0.6.0" + uuid "^3.3.2" + require-directory@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" @@ -4219,7 +4638,7 @@ ret@~0.1.10: resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== -rimraf@^2.5.2, rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2, rimraf@^2.6.3: +rimraf@^2.2.8, rimraf@^2.5.2, rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2, rimraf@^2.6.3: version "2.6.3" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA== @@ -4326,12 +4745,19 @@ safe-regex@^1.1.0: dependencies: ret "~0.1.10" -"safer-buffer@>= 2.1.2 < 3": +"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: version "2.1.2" resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== -sax@^1.2.4: +saucelabs@^1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/saucelabs/-/saucelabs-1.5.0.tgz#9405a73c360d449b232839919a86c396d379fd9d" + integrity sha512-jlX3FGdWvYf4Q3LFfFWS1QvPg3IGCGWxIc8QBFdPTbpTJnt/v17FHXYVAn7C8sHf1yUXo2c7yIM0isDryfYtHQ== + dependencies: + https-proxy-agent "^2.2.1" + +sax@>=0.6.0, sax@^1.2.4: version "1.2.4" resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== @@ -4345,6 +4771,16 @@ schema-utils@^1.0.0: ajv-errors "^1.0.0" ajv-keywords "^3.1.0" +selenium-webdriver@3.6.0, selenium-webdriver@^3.0.1: + version "3.6.0" + resolved "https://registry.yarnpkg.com/selenium-webdriver/-/selenium-webdriver-3.6.0.tgz#2ba87a1662c020b8988c981ae62cb2a01298eafc" + integrity sha512-WH7Aldse+2P5bbFBO4Gle/nuQOdVwpHMTL6raL3uuBj/vPG07k6uzt3aiahu352ONBr5xXh0hDlM3LhtXPOC4Q== + dependencies: + jszip "^3.1.3" + rimraf "^2.5.4" + tmp "0.0.30" + xml2js "^0.4.17" + semver-compare@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc" @@ -4380,6 +4816,11 @@ set-blocking@^2.0.0, set-blocking@~2.0.0: resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= +set-immediate-shim@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61" + integrity sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E= + set-value@^0.4.3: version "0.4.3" resolved "https://registry.yarnpkg.com/set-value/-/set-value-0.4.3.tgz#7db08f9d3d22dc7f78e53af3c3bf4666ecdfccf1" @@ -4534,6 +4975,13 @@ source-map-support@0.5.9: buffer-from "^1.0.0" source-map "^0.6.0" +source-map-support@~0.4.0: + version "0.4.18" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.18.tgz#0286a6de8be42641338594e97ccea75f0a2c585f" + integrity sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA== + dependencies: + source-map "^0.5.6" + source-map-support@~0.5.10, source-map-support@~0.5.12: version "0.5.12" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.12.tgz#b4f3b10d51857a5af0138d3ce8003b201613d599" @@ -4631,6 +5079,21 @@ sprintf-js@~1.0.2: resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= +sshpk@^1.7.0: + version "1.16.1" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.16.1.tgz#fb661c0bef29b39db40769ee39fa70093d6f6877" + integrity sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg== + dependencies: + asn1 "~0.2.3" + assert-plus "^1.0.0" + bcrypt-pbkdf "^1.0.0" + dashdash "^1.12.0" + ecc-jsbn "~0.1.1" + getpass "^0.1.1" + jsbn "~0.1.0" + safer-buffer "^2.0.2" + tweetnacl "~0.14.0" + ssri@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/ssri/-/ssri-6.0.1.tgz#2a3c41b28dd45b62b63676ecb74001265ae9edd8" @@ -4780,6 +5243,11 @@ subarg@^1.0.0: dependencies: minimist "^1.1.0" +supports-color@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" + integrity sha1-U10EXOa2Nj+kARcIRimZXp3zJMc= + supports-color@^3.1.2: version "3.2.3" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" @@ -4915,6 +5383,13 @@ timers-browserify@^2.0.4: dependencies: setimmediate "^1.0.4" +tmp@0.0.30: + version "0.0.30" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.30.tgz#72419d4a8be7d6ce75148fd8b324e593a711c2ed" + integrity sha1-ckGdSovn1s51FI/YsyTlk6cRwu0= + dependencies: + os-tmpdir "~1.0.1" + tmp@0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.1.0.tgz#ee434a4e22543082e294ba6201dcc6eafefa2877" @@ -4960,6 +5435,14 @@ to-regex@^3.0.1, to-regex@^3.0.2: regex-not "^1.0.2" safe-regex "^1.1.0" +tough-cookie@~2.4.3: + version "2.4.3" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.4.3.tgz#53f36da3f47783b0925afa06ff9f3b165280f781" + integrity sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ== + dependencies: + psl "^1.1.24" + punycode "^1.4.1" + trim-newlines@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613" @@ -5006,6 +5489,18 @@ tty-browserify@0.0.1: resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.1.tgz#3f05251ee17904dfd0677546670db9651682b811" integrity sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw== +tunnel-agent@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + integrity sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0= + dependencies: + safe-buffer "^5.0.1" + +tweetnacl@^0.14.3, tweetnacl@~0.14.0: + version "0.14.5" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" + integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= + type-check@~0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" @@ -5189,6 +5684,15 @@ validate-npm-package-license@^3.0.1: spdx-correct "^3.0.0" spdx-expression-parse "^3.0.0" +verror@1.10.0: + version "1.10.0" + resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" + integrity sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA= + dependencies: + assert-plus "^1.0.0" + core-util-is "1.0.2" + extsprintf "^1.2.0" + vm-browserify@^1.0.0, vm-browserify@^1.0.1: version "1.1.0" resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-1.1.0.tgz#bd76d6a23323e2ca8ffa12028dc04559c75f9019" @@ -5203,6 +5707,31 @@ watchpack@^1.5.0: graceful-fs "^4.1.2" neo-async "^2.5.0" +webdriver-js-extender@2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/webdriver-js-extender/-/webdriver-js-extender-2.1.0.tgz#57d7a93c00db4cc8d556e4d3db4b5db0a80c3bb7" + integrity sha512-lcUKrjbBfCK6MNsh7xaY2UAUmZwe+/ib03AjVOpFobX4O7+83BUveSrLfU0Qsyb1DaKJdQRbuU+kM9aZ6QUhiQ== + dependencies: + "@types/selenium-webdriver" "^3.0.0" + selenium-webdriver "^3.0.1" + +webdriver-manager@^12.0.6: + version "12.1.5" + resolved "https://registry.yarnpkg.com/webdriver-manager/-/webdriver-manager-12.1.5.tgz#28817b14d4b16b94ede10d5a7ee187aeb7679edf" + integrity sha512-f1apDjMpZ8SHlXtXGzqBxOjV+WQcDRz5PN7pWScgjXS7vhUIFcM3V89Shetf4A04n8DDR2MxiVQq6JproFcRZw== + dependencies: + adm-zip "^0.4.9" + chalk "^1.1.1" + del "^2.2.0" + glob "^7.0.3" + ini "^1.3.4" + minimist "^1.2.0" + q "^1.4.1" + request "^2.87.0" + rimraf "^2.5.2" + semver "^5.3.0" + xml2js "^0.4.17" + webpack-sources@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.3.0.tgz#2a28dcb9f1f45fe960d8f1493252b5ee6530fa85" @@ -5290,6 +5819,19 @@ wrappy@1: resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= +xml2js@^0.4.17: + version "0.4.19" + resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.4.19.tgz#686c20f213209e94abf0d1bcf1efaa291c7827a7" + integrity sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q== + dependencies: + sax ">=0.6.0" + xmlbuilder "~9.0.1" + +xmlbuilder@~9.0.1: + version "9.0.7" + resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-9.0.7.tgz#132ee63d2ec5565c557e20f4c22df9aca686b10d" + integrity sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0= + xtend@^4.0.0, xtend@^4.0.1, xtend@~4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af"